1
Fork 0
rust/src/test/ui/lint/lint-unconditional-recursion.stderr

158 lines
5.7 KiB
Text
Raw Normal View History

error: function cannot return without recursing
2018-12-25 08:56:47 -07:00
--> $DIR/lint-unconditional-recursion.rs:4:1
|
LL | fn foo() { //~ ERROR function cannot return without recursing
| ^^^^^^^^ cannot return without recursing
2018-02-23 03:42:32 +03:00
LL | foo();
| ----- recursive call site
|
note: lint level defined here
2018-12-25 08:56:47 -07:00
--> $DIR/lint-unconditional-recursion.rs:1:9
|
2018-02-23 03:42:32 +03:00
LL | #![deny(unconditional_recursion)]
| ^^^^^^^^^^^^^^^^^^^^^^^
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
2018-12-25 08:56:47 -07:00
--> $DIR/lint-unconditional-recursion.rs:14:1
|
LL | fn baz() { //~ ERROR function cannot return without recursing
| ^^^^^^^^ cannot return without recursing
2018-02-25 02:01:39 +03:00
LL | if true {
2018-02-23 03:42:32 +03:00
LL | baz()
| ----- recursive call site
2018-02-25 02:01:39 +03:00
LL | } else {
2018-02-23 03:42:32 +03:00
LL | baz()
| ----- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
2018-12-25 08:56:47 -07:00
--> $DIR/lint-unconditional-recursion.rs:26:1
|
LL | fn quz() -> bool { //~ ERROR function cannot return without recursing
| ^^^^^^^^^^^^^^^^ cannot return without recursing
2018-02-25 02:01:39 +03:00
LL | if true {
2018-02-23 03:42:32 +03:00
LL | while quz() {}
| ----- recursive call site
...
2018-02-23 03:42:32 +03:00
LL | loop { quz(); }
| ----- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
2018-12-25 08:56:47 -07:00
--> $DIR/lint-unconditional-recursion.rs:37:5
|
LL | fn bar(&self) { //~ ERROR function cannot return without recursing
| ^^^^^^^^^^^^^ cannot return without recursing
2018-02-23 03:42:32 +03:00
LL | self.bar()
| ---------- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
2018-12-25 08:56:47 -07:00
--> $DIR/lint-unconditional-recursion.rs:43:5
|
LL | fn bar(&self) { //~ ERROR function cannot return without recursing
| ^^^^^^^^^^^^^ cannot return without recursing
2018-02-25 02:01:39 +03:00
LL | loop {
2018-02-23 03:42:32 +03:00
LL | self.bar()
| ---------- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
2018-12-25 08:56:47 -07:00
--> $DIR/lint-unconditional-recursion.rs:52:5
|
LL | fn bar(&self) { //~ ERROR function cannot return without recursing
| ^^^^^^^^^^^^^ cannot return without recursing
2018-02-23 03:42:32 +03:00
LL | 0.bar()
| ------- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
2018-12-25 08:56:47 -07:00
--> $DIR/lint-unconditional-recursion.rs:65:5
|
LL | fn bar(&self) { //~ ERROR function cannot return without recursing
| ^^^^^^^^^^^^^ cannot return without recursing
2018-02-23 03:42:32 +03:00
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
2018-12-25 08:56:47 -07:00
--> $DIR/lint-unconditional-recursion.rs:71:5
|
LL | fn bar(&self) { //~ ERROR function cannot return without recursing
| ^^^^^^^^^^^^^ cannot return without recursing
2018-02-25 02:01:39 +03:00
LL | loop {
2018-02-23 03:42:32 +03:00
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
2018-12-25 08:56:47 -07:00
--> $DIR/lint-unconditional-recursion.rs:81:5
|
LL | fn qux(&self) { //~ ERROR function cannot return without recursing
| ^^^^^^^^^^^^^ cannot return without recursing
2018-02-23 03:42:32 +03:00
LL | self.qux();
| ---------- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
2018-12-25 08:56:47 -07:00
--> $DIR/lint-unconditional-recursion.rs:86:5
|
LL | fn as_ref(&self) -> &Self { //~ ERROR function cannot return without recursing
| ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
2018-02-23 03:42:32 +03:00
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
2018-12-25 08:56:47 -07:00
--> $DIR/lint-unconditional-recursion.rs:93:5
2018-02-23 03:42:32 +03:00
|
LL | fn default() -> Baz { //~ ERROR function cannot return without recursing
| ^^^^^^^^^^^^^^^^^^^ cannot return without recursing
2018-02-23 03:42:32 +03:00
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
2018-12-25 08:56:47 -07:00
--> $DIR/lint-unconditional-recursion.rs:102:5
2018-02-23 03:42:32 +03:00
|
LL | fn deref(&self) -> &() { //~ ERROR function cannot return without recursing
| ^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
2018-02-23 03:42:32 +03:00
LL | &**self
| ------ recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
2018-12-25 08:56:47 -07:00
--> $DIR/lint-unconditional-recursion.rs:109:5
2018-02-23 03:42:32 +03:00
|
LL | fn index(&self, x: usize) -> &Baz { //~ ERROR function cannot return without recursing
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
2018-02-23 03:42:32 +03:00
LL | &self[x]
| ------- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
2018-12-25 08:56:47 -07:00
--> $DIR/lint-unconditional-recursion.rs:118:5
2018-02-23 03:42:32 +03:00
|
LL | fn deref(&self) -> &Baz { //~ ERROR function cannot return without recursing
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
2018-02-23 03:42:32 +03:00
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