blob: 1770d71e2e2fe6f12d2921aa17ce029995aa2e87 [file] [log] [blame]
error: function cannot return without recursing
--> $DIR/lint-unconditional-recursion.rs:4:1
|
LL | fn foo() {
| ^^^^^^^^ cannot return without recursing
LL | foo();
| ----- recursive call site
|
note: the lint level is defined here
--> $DIR/lint-unconditional-recursion.rs:1:9
|
LL | #![deny(unconditional_recursion)]
| ^^^^^^^^^^^^^^^^^^^^^^^
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
--> $DIR/lint-unconditional-recursion.rs:14:1
|
LL | fn baz() {
| ^^^^^^^^ cannot return without recursing
LL | if true {
LL | baz()
| ----- recursive call site
LL | } else {
LL | baz()
| ----- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
--> $DIR/lint-unconditional-recursion.rs:26:1
|
LL | fn quz() -> bool {
| ^^^^^^^^^^^^^^^^ cannot return without recursing
LL | if true {
LL | while quz() {}
| ----- recursive call site
...
LL | loop { quz(); }
| ----- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
--> $DIR/lint-unconditional-recursion.rs:37:5
|
LL | fn bar(&self) {
| ^^^^^^^^^^^^^ cannot return without recursing
LL | self.bar()
| ---------- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
--> $DIR/lint-unconditional-recursion.rs:43:5
|
LL | fn bar(&self) {
| ^^^^^^^^^^^^^ cannot return without recursing
LL | loop {
LL | self.bar()
| ---------- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
--> $DIR/lint-unconditional-recursion.rs:52:5
|
LL | fn bar(&self) {
| ^^^^^^^^^^^^^ cannot return without recursing
LL | 0.bar()
| ------- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
--> $DIR/lint-unconditional-recursion.rs:65:5
|
LL | fn bar(&self) {
| ^^^^^^^^^^^^^ cannot return without recursing
LL | Foo2::bar(self)
| --------------- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
--> $DIR/lint-unconditional-recursion.rs:71:5
|
LL | fn bar(&self) {
| ^^^^^^^^^^^^^ cannot return without recursing
LL | loop {
LL | Foo2::bar(self)
| --------------- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
--> $DIR/lint-unconditional-recursion.rs:81:5
|
LL | fn qux(&self) {
| ^^^^^^^^^^^^^ cannot return without recursing
LL | self.qux();
| ---------- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
--> $DIR/lint-unconditional-recursion.rs:86:5
|
LL | fn as_ref(&self) -> &Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
LL | Baz::as_ref(self)
| ----------------- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
--> $DIR/lint-unconditional-recursion.rs:93:5
|
LL | fn default() -> Baz {
| ^^^^^^^^^^^^^^^^^^^ cannot return without recursing
LL | let x = Default::default();
| ------------------ recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
--> $DIR/lint-unconditional-recursion.rs:102:5
|
LL | fn deref(&self) -> &() {
| ^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
LL | &**self
| ------ recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
--> $DIR/lint-unconditional-recursion.rs:109:5
|
LL | fn index(&self, x: usize) -> &Baz {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
LL | &self[x]
| ------- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
--> $DIR/lint-unconditional-recursion.rs:118:5
|
LL | fn deref(&self) -> &Baz {
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
LL | self.as_ref()
| ---- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: aborting due to 14 previous errors