rust/tests/ui/for-loop-while/while-let-2.stderr

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

43 lines
1.5 KiB
Plaintext
Raw Normal View History

warning: irrefutable `while let` pattern
--> $DIR/while-let-2.rs:7:19
2018-08-08 12:28:26 +00:00
|
LL | while let $p = $e $b
2021-08-08 14:49:13 +00:00
| ^^^
...
LL | / foo!(_a, 1, {
LL | | println!("irrefutable pattern");
LL | | });
2021-10-14 18:28:28 +00:00
| |______- in this macro invocation
2018-08-08 12:28:26 +00:00
|
= note: this pattern will always match, so the loop will never exit
= help: consider instead using a `loop { ... }` with a `let` inside it
2022-09-18 15:55:36 +00:00
= note: `#[warn(irrefutable_let_patterns)]` on by default
= note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
2018-08-08 12:28:26 +00:00
warning: irrefutable `while let` pattern
--> $DIR/while-let-2.rs:7:19
2018-08-08 12:28:26 +00:00
|
LL | while let $p = $e $b
2021-08-08 14:49:13 +00:00
| ^^^
...
LL | / bar!(_a, 1, {
LL | | println!("irrefutable pattern");
LL | | });
2021-10-14 18:28:28 +00:00
| |______- in this macro invocation
|
= note: this pattern will always match, so the loop will never exit
= help: consider instead using a `loop { ... }` with a `let` inside it
= note: this warning originates in the macro `foo` which comes from the expansion of the macro `bar` (in Nightly builds, run with -Z macro-backtrace for more info)
2018-08-08 12:28:26 +00:00
warning: irrefutable `while let` pattern
--> $DIR/while-let-2.rs:27:11
|
2021-08-08 14:49:13 +00:00
LL | while let _a = 1 {
| ^^^^^^^^^^
|
= note: this pattern will always match, so the loop will never exit
= help: consider instead using a `loop { ... }` with a `let` inside it
2018-08-08 12:28:26 +00:00
warning: 3 warnings emitted