rust/tests/ui/lint/lint-unconditional-recursion.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

202 lines
6.5 KiB
Plaintext
Raw Normal View History

error: function cannot return without recursing
2018-12-25 15:56:47 +00:00
--> $DIR/lint-unconditional-recursion.rs:4:1
|
2019-03-09 12:03:44 +00:00
LL | fn foo() {
| ^^^^^^^^ cannot return without recursing
2018-02-23 00:42:32 +00:00
LL | foo();
| ----- recursive call site
|
2022-09-18 15:55:36 +00:00
= help: a `loop` may express intention better if this is on purpose
2020-01-22 23:57:38 +00:00
note: the lint level is defined here
2018-12-25 15:56:47 +00:00
--> $DIR/lint-unconditional-recursion.rs:1:9
|
2018-02-23 00:42:32 +00:00
LL | #![deny(unconditional_recursion)]
| ^^^^^^^^^^^^^^^^^^^^^^^
error: function cannot return without recursing
2018-12-25 15:56:47 +00:00
--> $DIR/lint-unconditional-recursion.rs:14:1
|
2019-03-09 12:03:44 +00:00
LL | fn baz() {
| ^^^^^^^^ cannot return without recursing
2018-02-24 23:01:39 +00:00
LL | if true {
2018-02-23 00:42:32 +00:00
LL | baz()
| ----- recursive call site
2018-02-24 23:01:39 +00:00
LL | } else {
2018-02-23 00:42:32 +00: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 15:56:47 +00:00
--> $DIR/lint-unconditional-recursion.rs:26:1
|
2019-03-09 12:03:44 +00:00
LL | fn quz() -> bool {
| ^^^^^^^^^^^^^^^^ cannot return without recursing
2018-02-24 23:01:39 +00:00
LL | if true {
2018-02-23 00:42:32 +00:00
LL | while quz() {}
| ----- recursive call site
...
2018-02-23 00:42:32 +00: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 15:56:47 +00:00
--> $DIR/lint-unconditional-recursion.rs:37:5
|
2019-03-09 12:03:44 +00:00
LL | fn bar(&self) {
| ^^^^^^^^^^^^^ cannot return without recursing
2018-02-23 00:42:32 +00: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 15:56:47 +00:00
--> $DIR/lint-unconditional-recursion.rs:43:5
|
2019-03-09 12:03:44 +00:00
LL | fn bar(&self) {
| ^^^^^^^^^^^^^ cannot return without recursing
2018-02-24 23:01:39 +00:00
LL | loop {
2018-02-23 00:42:32 +00: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 15:56:47 +00:00
--> $DIR/lint-unconditional-recursion.rs:52:5
|
2019-03-09 12:03:44 +00:00
LL | fn bar(&self) {
| ^^^^^^^^^^^^^ cannot return without recursing
2018-02-23 00:42:32 +00: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 15:56:47 +00:00
--> $DIR/lint-unconditional-recursion.rs:65:5
|
2019-03-09 12:03:44 +00:00
LL | fn bar(&self) {
| ^^^^^^^^^^^^^ cannot return without recursing
2018-02-23 00:42:32 +00: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 15:56:47 +00:00
--> $DIR/lint-unconditional-recursion.rs:71:5
|
2019-03-09 12:03:44 +00:00
LL | fn bar(&self) {
| ^^^^^^^^^^^^^ cannot return without recursing
2018-02-24 23:01:39 +00:00
LL | loop {
2018-02-23 00:42:32 +00: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 15:56:47 +00:00
--> $DIR/lint-unconditional-recursion.rs:81:5
|
2019-03-09 12:03:44 +00:00
LL | fn qux(&self) {
| ^^^^^^^^^^^^^ cannot return without recursing
2018-02-23 00:42:32 +00: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 15:56:47 +00:00
--> $DIR/lint-unconditional-recursion.rs:86:5
|
2019-03-09 12:03:44 +00:00
LL | fn as_ref(&self) -> &Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
2018-02-23 00:42:32 +00: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 15:56:47 +00:00
--> $DIR/lint-unconditional-recursion.rs:93:5
2018-02-23 00:42:32 +00:00
|
2019-03-09 12:03:44 +00:00
LL | fn default() -> Baz {
| ^^^^^^^^^^^^^^^^^^^ cannot return without recursing
2018-02-23 00:42:32 +00: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 15:56:47 +00:00
--> $DIR/lint-unconditional-recursion.rs:102:5
2018-02-23 00:42:32 +00:00
|
2019-03-09 12:03:44 +00:00
LL | fn deref(&self) -> &() {
| ^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
2018-02-23 00:42:32 +00: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 15:56:47 +00:00
--> $DIR/lint-unconditional-recursion.rs:109:5
2018-02-23 00:42:32 +00:00
|
2019-03-09 12:03:44 +00:00
LL | fn index(&self, x: usize) -> &Baz {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
2018-02-23 00:42:32 +00: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 15:56:47 +00:00
--> $DIR/lint-unconditional-recursion.rs:118:5
2018-02-23 00:42:32 +00:00
|
2019-03-09 12:03:44 +00:00
LL | fn deref(&self) -> &Baz {
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
2018-02-23 00:42:32 +00:00
LL | self.as_ref()
| ------------- recursive call site
2018-02-23 00:42:32 +00:00
|
= help: a `loop` may express intention better if this is on purpose
error: function cannot return without recursing
--> $DIR/lint-unconditional-recursion.rs:162:1
|
LL | pub fn drop_and_replace(mut a: Option<String>) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
LL | a = None;
LL | drop_and_replace(a);
| ------------------- 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:168:1
|
LL | pub fn call() -> String {
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
LL | let s = String::new();
LL | call();
| ------ 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:175:1
|
LL | pub fn overflow_check(a: i32, b: i32) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
LL | let _ = a + b;
LL | overflow_check(a, b);
| -------------------- 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:186:5
|
LL | fn default() -> Self {
| ^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
...
LL | ..Default::default()
| ------------------ recursive call site
|
= help: a `loop` may express intention better if this is on purpose
error: aborting due to 18 previous errors