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-17 23:46:55 -08:00
|
|
|
14 | fn foo() { //~ ERROR function cannot return without recurring
|
|
|
|
| ^^^^^^^^ cannot return without recurring
|
|
|
|
15 | foo();
|
|
|
|
| ----- recursive call site
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/lint-unconditional-recursion.rs:11:9
|
|
|
|
|
|
|
|
|
11 | #![deny(unconditional_recursion)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
= 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
|
|
|
|
|
|
2017-12-17 23:46:55 -08:00
|
|
|
24 | fn baz() { //~ ERROR function cannot return without recurring
|
|
|
|
| ^^^^^^^^ cannot return without recurring
|
|
|
|
25 | if true {
|
2017-12-10 23:29:24 +03:00
|
|
|
26 | baz()
|
2017-12-17 23:46:55 -08:00
|
|
|
| ----- recursive call site
|
|
|
|
27 | } else {
|
2017-12-10 23:29:24 +03:00
|
|
|
28 | baz()
|
2017-12-17 23:46:55 -08:00
|
|
|
| ----- recursive call site
|
|
|
|
|
|
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-17 23:46:55 -08:00
|
|
|
36 | fn quz() -> bool { //~ ERROR function cannot return without recurring
|
|
|
|
| ^^^^^^^^^^^^^^^^ cannot return without recurring
|
|
|
|
37 | if true {
|
2017-12-10 23:29:24 +03:00
|
|
|
38 | while quz() {}
|
2017-12-17 23:46:55 -08:00
|
|
|
| ----- recursive call site
|
|
|
|
...
|
2017-12-10 23:29:24 +03:00
|
|
|
41 | loop { quz(); }
|
2017-12-17 23:46:55 -08:00
|
|
|
| ----- recursive call site
|
|
|
|
|
|
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-17 23:46:55 -08:00
|
|
|
47 | fn bar(&self) { //~ ERROR function cannot return without recurring
|
|
|
|
| ^^^^^^^^^^^^^ cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
48 | self.bar()
|
2017-12-17 23:46:55 -08:00
|
|
|
| ---------- recursive call site
|
|
|
|
|
|
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-17 23:46:55 -08:00
|
|
|
53 | fn bar(&self) { //~ ERROR function cannot return without recurring
|
|
|
|
| ^^^^^^^^^^^^^ cannot return without recurring
|
|
|
|
54 | loop {
|
2017-12-10 23:29:24 +03:00
|
|
|
55 | self.bar()
|
2017-12-17 23:46:55 -08:00
|
|
|
| ---------- recursive call site
|
|
|
|
|
|
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-17 23:46:55 -08:00
|
|
|
62 | fn bar(&self) { //~ ERROR function cannot return without recurring
|
|
|
|
| ^^^^^^^^^^^^^ cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
63 | 0.bar()
|
2017-12-17 23:46:55 -08:00
|
|
|
| ------- recursive call site
|
|
|
|
|
|
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-17 23:46:55 -08:00
|
|
|
75 | fn bar(&self) { //~ ERROR function cannot return without recurring
|
|
|
|
| ^^^^^^^^^^^^^ cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
76 | Foo2::bar(self)
|
2017-12-17 23:46:55 -08:00
|
|
|
| --------------- recursive call site
|
|
|
|
|
|
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-17 23:46:55 -08:00
|
|
|
81 | fn bar(&self) { //~ ERROR function cannot return without recurring
|
|
|
|
| ^^^^^^^^^^^^^ cannot return without recurring
|
|
|
|
82 | loop {
|
2017-12-10 23:29:24 +03:00
|
|
|
83 | Foo2::bar(self)
|
2017-12-17 23:46:55 -08:00
|
|
|
| --------------- recursive call site
|
|
|
|
|
|
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-17 23:46:55 -08:00
|
|
|
91 | fn qux(&self) { //~ ERROR function cannot return without recurring
|
|
|
|
| ^^^^^^^^^^^^^ cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
92 | self.qux();
|
2017-12-17 23:46:55 -08:00
|
|
|
| ---------- recursive call site
|
|
|
|
|
|
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-17 23:46:55 -08:00
|
|
|
96 | fn as_ref(&self) -> &Self { //~ ERROR function cannot return without recurring
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
97 | Baz::as_ref(self)
|
2017-12-17 23:46:55 -08:00
|
|
|
| ----------------- recursive call site
|
|
|
|
|
|
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-17 23:46:55 -08:00
|
|
|
103 | fn default() -> Baz { //~ ERROR function cannot return without recurring
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^ cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
104 | let x = Default::default();
|
2017-12-17 23:46:55 -08:00
|
|
|
| ------------------ recursive call site
|
|
|
|
|
|
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-17 23:46:55 -08:00
|
|
|
112 | fn deref(&self) -> &() { //~ ERROR function cannot return without recurring
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
113 | &**self
|
2017-12-17 23:46:55 -08:00
|
|
|
| ------ recursive call site
|
|
|
|
|
|
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-17 23:46:55 -08:00
|
|
|
119 | fn index(&self, x: usize) -> &Baz { //~ ERROR function cannot return without recurring
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
120 | &self[x]
|
2017-12-17 23:46:55 -08:00
|
|
|
| ------- recursive call site
|
|
|
|
|
|
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-17 23:46:55 -08:00
|
|
|
128 | fn deref(&self) -> &Baz { //~ ERROR function cannot return without recurring
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring
|
2017-12-10 23:29:24 +03:00
|
|
|
129 | self.as_ref()
|
2017-12-17 23:46:55 -08:00
|
|
|
| ---- recursive call site
|
|
|
|
|
|
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
|
|
|
|
|