2017-12-10 22:47:55 +03:00
|
|
|
error: function cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:14:1
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
14 | / fn foo() { //~ ERROR function cannot return without recurring
|
|
|
|
|
15 | | foo();
|
|
|
|
|
16 | | }
|
2017-12-10 22:47:55 +03:00
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
|
--> $DIR/lint-unconditional-recursion.rs:11:9
|
|
|
|
|
|
|
|
|
|
|
11 | #![deny(unconditional_recursion)]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
note: recursive call site
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:15:5
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
15 | foo();
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^^^^^
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
|
|
|
|
|
error: function cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:24:1
|
|
|
|
|
|
|
|
|
|
|
24 | / fn baz() { //~ ERROR function cannot return without recurring
|
|
|
|
|
25 | | if true {
|
|
|
|
|
26 | | baz()
|
|
|
|
|
27 | | } else {
|
|
|
|
|
28 | | baz()
|
|
|
|
|
29 | | }
|
|
|
|
|
30 | | }
|
2017-12-10 22:47:55 +03:00
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
|
|
note: recursive call site
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:26:9
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
26 | baz()
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^^^^^
|
|
|
|
|
note: recursive call site
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:28:9
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
28 | baz()
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^^^^^
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
|
|
|
|
|
error: function cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:36:1
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
36 | / fn quz() -> bool { //~ ERROR function cannot return without recurring
|
|
|
|
|
37 | | if true {
|
|
|
|
|
38 | | while quz() {}
|
|
|
|
|
39 | | true
|
2017-12-10 22:47:55 +03:00
|
|
|
... |
|
2017-12-10 23:29:24 +03:00
|
|
|
42 | | }
|
|
|
|
|
43 | | }
|
2017-12-10 22:47:55 +03:00
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
|
|
note: recursive call site
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:38:15
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
38 | while quz() {}
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^^^^^
|
|
|
|
|
note: recursive call site
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:41:16
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
41 | loop { quz(); }
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^^^^^
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
|
|
|
|
|
error: function cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:47:5
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
47 | / fn bar(&self) { //~ ERROR function cannot return without recurring
|
|
|
|
|
48 | | self.bar()
|
|
|
|
|
49 | | }
|
2017-12-10 22:47:55 +03:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
|
|
note: recursive call site
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:48:9
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
48 | self.bar()
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
|
|
|
|
|
error: function cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:53:5
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
53 | / fn bar(&self) { //~ ERROR function cannot return without recurring
|
|
|
|
|
54 | | loop {
|
|
|
|
|
55 | | self.bar()
|
|
|
|
|
56 | | }
|
|
|
|
|
57 | | }
|
2017-12-10 22:47:55 +03:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
|
|
note: recursive call site
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:55:13
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
55 | self.bar()
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
|
|
|
|
|
error: function cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:62:5
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
62 | / fn bar(&self) { //~ ERROR function cannot return without recurring
|
|
|
|
|
63 | | 0.bar()
|
|
|
|
|
64 | | }
|
2017-12-10 22:47:55 +03:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
|
|
note: recursive call site
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:63:9
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
63 | 0.bar()
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^^^^^^^
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
|
|
|
|
|
error: function cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:75:5
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
75 | / fn bar(&self) { //~ ERROR function cannot return without recurring
|
|
|
|
|
76 | | Foo2::bar(self)
|
|
|
|
|
77 | | }
|
2017-12-10 22:47:55 +03:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
|
|
note: recursive call site
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:76:9
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
76 | Foo2::bar(self)
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
|
|
|
|
|
error: function cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:81:5
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
81 | / fn bar(&self) { //~ ERROR function cannot return without recurring
|
|
|
|
|
82 | | loop {
|
|
|
|
|
83 | | Foo2::bar(self)
|
|
|
|
|
84 | | }
|
|
|
|
|
85 | | }
|
2017-12-10 22:47:55 +03:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
|
|
note: recursive call site
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:83:13
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
83 | Foo2::bar(self)
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
|
|
|
|
|
error: function cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:91:5
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
91 | / fn qux(&self) { //~ ERROR function cannot return without recurring
|
|
|
|
|
92 | | self.qux();
|
|
|
|
|
93 | | }
|
2017-12-10 22:47:55 +03:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
|
|
note: recursive call site
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:92:9
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
92 | self.qux();
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
|
|
|
|
|
error: function cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:96:5
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
96 | / fn as_ref(&self) -> &Self { //~ ERROR function cannot return without recurring
|
|
|
|
|
97 | | Baz::as_ref(self)
|
|
|
|
|
98 | | }
|
2017-12-10 22:47:55 +03:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
|
|
note: recursive call site
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:97:9
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
97 | Baz::as_ref(self)
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
|
|
|
|
|
error: function cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:103:5
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
103 | / fn default() -> Baz { //~ ERROR function cannot return without recurring
|
|
|
|
|
104 | | let x = Default::default();
|
|
|
|
|
105 | | x
|
|
|
|
|
106 | | }
|
2017-12-10 22:47:55 +03:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
|
|
note: recursive call site
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:104:17
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
104 | let x = Default::default();
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
|
|
|
|
|
error: function cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:112:5
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
112 | / fn deref(&self) -> &() { //~ ERROR function cannot return without recurring
|
|
|
|
|
113 | | &**self
|
|
|
|
|
114 | | }
|
2017-12-10 22:47:55 +03:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
|
|
note: recursive call site
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:113:10
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
113 | &**self
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^^^^^^
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
|
|
|
|
|
error: function cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:119:5
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
119 | / fn index(&self, x: usize) -> &Baz { //~ ERROR function cannot return without recurring
|
|
|
|
|
120 | | &self[x]
|
|
|
|
|
121 | | }
|
2017-12-10 22:47:55 +03:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
|
|
note: recursive call site
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:120:10
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
120 | &self[x]
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^^^^^^^
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
|
|
|
|
|
error: function cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:128:5
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
128 | / fn deref(&self) -> &Baz { //~ ERROR function cannot return without recurring
|
|
|
|
|
129 | | self.as_ref()
|
|
|
|
|
130 | | }
|
2017-12-10 22:47:55 +03:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
|
|
note: recursive call site
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:129:9
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
129 | self.as_ref()
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^^^^
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
|
|
|
|
|
error: aborting due to 14 previous errors
|
|
|
|
|
|