]>
Commit | Line | Data |
---|---|---|
6a06907d | 1 | warning: irrefutable `if let` pattern |
94222f64 | 2 | --> $DIR/if-let.rs:6:16 |
b7449926 | 3 | | |
0731742a | 4 | LL | if let $p = $e $b |
94222f64 | 5 | | ^^^ |
0731742a | 6 | ... |
532ac7d7 | 7 | LL | / foo!(a, 1, { |
0731742a XL |
8 | LL | | println!("irrefutable pattern"); |
9 | LL | | }); | |
c295e0f8 | 10 | | |______- in this macro invocation |
b7449926 | 11 | | |
416331ca | 12 | = note: `#[warn(irrefutable_let_patterns)]` on by default |
6a06907d XL |
13 | = note: this pattern will always match, so the `if let` is useless |
14 | = help: consider replacing the `if let` with a `let` | |
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 `if let` pattern |
94222f64 | 18 | --> $DIR/if-let.rs:6:16 |
b7449926 | 19 | | |
0731742a | 20 | LL | if let $p = $e $b |
94222f64 | 21 | | ^^^ |
0731742a | 22 | ... |
532ac7d7 | 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 `if let` is useless |
29 | = help: consider replacing the `if let` with a `let` | |
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 `if let` pattern |
94222f64 | 33 | --> $DIR/if-let.rs:26:8 |
b7449926 | 34 | | |
94222f64 XL |
35 | LL | if let a = 1 { |
36 | | ^^^^^^^^^ | |
6a06907d XL |
37 | | |
38 | = note: this pattern will always match, so the `if let` is useless | |
39 | = help: consider replacing the `if let` with a `let` | |
b7449926 | 40 | |
6a06907d | 41 | warning: irrefutable `if let` pattern |
94222f64 | 42 | --> $DIR/if-let.rs:30:8 |
b7449926 | 43 | | |
94222f64 XL |
44 | LL | if let a = 1 { |
45 | | ^^^^^^^^^ | |
6a06907d XL |
46 | | |
47 | = note: this pattern will always match, so the `if let` is useless | |
48 | = help: consider replacing the `if let` with a `let` | |
b7449926 | 49 | |
6a06907d | 50 | warning: irrefutable `if let` pattern |
94222f64 | 51 | --> $DIR/if-let.rs:40:15 |
b7449926 | 52 | | |
94222f64 XL |
53 | LL | } else if let a = 1 { |
54 | | ^^^^^^^^^ | |
6a06907d XL |
55 | | |
56 | = note: this pattern will always match, so the `if let` is useless | |
57 | = help: consider replacing the `if let` with a `let` | |
b7449926 | 58 | |
6a06907d | 59 | warning: irrefutable `if let` pattern |
94222f64 | 60 | --> $DIR/if-let.rs:46:15 |
0731742a | 61 | | |
94222f64 XL |
62 | LL | } else if let a = 1 { |
63 | | ^^^^^^^^^ | |
6a06907d XL |
64 | | |
65 | = note: this pattern will always match, so the `if let` is useless | |
66 | = help: consider replacing the `if let` with a `let` | |
b7449926 | 67 | |
ba9703b0 XL |
68 | warning: 6 warnings emitted |
69 |