]>
Commit | Line | Data |
---|---|---|
6a06907d | 1 | warning: irrefutable `while let` pattern |
3c0e092e | 2 | --> $DIR/while-let-2.rs:7:19 |
b7449926 | 3 | | |
0731742a | 4 | LL | while let $p = $e $b |
94222f64 | 5 | | ^^^ |
0731742a | 6 | ... |
e1599b0c | 7 | LL | / foo!(_a, 1, { |
0731742a XL |
8 | LL | | println!("irrefutable pattern"); |
9 | LL | | }); | |
c295e0f8 | 10 | | |______- in this macro invocation |
b7449926 | 11 | | |
6a06907d XL |
12 | = note: this pattern will always match, so the loop will never exit |
13 | = help: consider instead using a `loop { ... }` with a `let` inside it | |
2b03887a | 14 | = note: `#[warn(irrefutable_let_patterns)]` on by default |
17df50a5 | 15 | = note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) |
b7449926 | 16 | |
6a06907d | 17 | warning: irrefutable `while let` pattern |
3c0e092e | 18 | --> $DIR/while-let-2.rs:7:19 |
b7449926 | 19 | | |
0731742a | 20 | LL | while let $p = $e $b |
94222f64 | 21 | | ^^^ |
0731742a | 22 | ... |
e1599b0c | 23 | LL | / bar!(_a, 1, { |
0731742a XL |
24 | LL | | println!("irrefutable pattern"); |
25 | LL | | }); | |
c295e0f8 | 26 | | |______- in this macro invocation |
74b04a01 | 27 | | |
6a06907d XL |
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 | |
064997fb | 30 | = 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) |
b7449926 | 31 | |
6a06907d | 32 | warning: irrefutable `while let` pattern |
3c0e092e | 33 | --> $DIR/while-let-2.rs:27:11 |
0731742a | 34 | | |
94222f64 XL |
35 | LL | while let _a = 1 { |
36 | | ^^^^^^^^^^ | |
6a06907d XL |
37 | | |
38 | = note: this pattern will always match, so the loop will never exit | |
39 | = help: consider instead using a `loop { ... }` with a `let` inside it | |
b7449926 | 40 | |
ba9703b0 XL |
41 | warning: 3 warnings emitted |
42 |