]> git.lizzy.rs Git - rust.git/blob - src/test/ui/while-let.stderr
Rollup merge of #82259 - osa1:issue82156, r=petrochenkov
[rust.git] / src / test / ui / while-let.stderr
1 warning: irrefutable `while let` pattern
2   --> $DIR/while-let.rs:7:13
3    |
4 LL |               while let $p = $e $b
5    |               ^^^^^^^^^^^^^^^^^^^^
6 ...
7 LL | /     foo!(_a, 1, {
8 LL | |         println!("irrefutable pattern");
9 LL | |     });
10    | |_______- in this macro invocation
11    |
12    = note: `#[warn(irrefutable_let_patterns)]` on by default
13    = note: this pattern will always match, so the loop will never exit
14    = help: consider instead using a `loop { ... }` with a `let` inside it
15    = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
16
17 warning: irrefutable `while let` pattern
18   --> $DIR/while-let.rs:7:13
19    |
20 LL |               while let $p = $e $b
21    |               ^^^^^^^^^^^^^^^^^^^^
22 ...
23 LL | /     bar!(_a, 1, {
24 LL | |         println!("irrefutable pattern");
25 LL | |     });
26    | |_______- in this macro invocation
27    |
28    = note: this pattern will always match, so the loop will never exit
29    = help: consider instead using a `loop { ... }` with a `let` inside it
30    = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
31
32 warning: irrefutable `while let` pattern
33   --> $DIR/while-let.rs:27:5
34    |
35 LL | /     while let _a = 1 {
36 LL | |         println!("irrefutable pattern");
37 LL | |         break;
38 LL | |     }
39    | |_____^
40    |
41    = note: this pattern will always match, so the loop will never exit
42    = help: consider instead using a `loop { ... }` with a `let` inside it
43
44 warning: 3 warnings emitted
45