]>
Commit | Line | Data |
---|---|---|
0731742a XL |
1 | warning: irrefutable if-let pattern |
2 | --> $DIR/if-let.rs:6:13 | |
b7449926 | 3 | | |
0731742a | 4 | LL | if let $p = $e $b |
dfeec247 | 5 | | ^^^^^^^^^^^^^^^^^ |
0731742a | 6 | ... |
532ac7d7 | 7 | LL | / foo!(a, 1, { |
0731742a XL |
8 | LL | | println!("irrefutable pattern"); |
9 | LL | | }); | |
10 | | |_______- in this macro invocation | |
b7449926 | 11 | | |
416331ca | 12 | = note: `#[warn(irrefutable_let_patterns)]` on by default |
74b04a01 | 13 | = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) |
b7449926 | 14 | |
0731742a XL |
15 | warning: irrefutable if-let pattern |
16 | --> $DIR/if-let.rs:6:13 | |
b7449926 | 17 | | |
0731742a | 18 | LL | if let $p = $e $b |
dfeec247 | 19 | | ^^^^^^^^^^^^^^^^^ |
0731742a | 20 | ... |
532ac7d7 | 21 | LL | / bar!(a, 1, { |
0731742a XL |
22 | LL | | println!("irrefutable pattern"); |
23 | LL | | }); | |
24 | | |_______- in this macro invocation | |
74b04a01 XL |
25 | | |
26 | = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) | |
b7449926 | 27 | |
0731742a | 28 | warning: irrefutable if-let pattern |
e74abb32 | 29 | --> $DIR/if-let.rs:26:5 |
b7449926 | 30 | | |
532ac7d7 | 31 | LL | / if let a = 1 { |
0731742a XL |
32 | LL | | println!("irrefutable pattern"); |
33 | LL | | } | |
34 | | |_____^ | |
b7449926 | 35 | |
0731742a | 36 | warning: irrefutable if-let pattern |
e74abb32 | 37 | --> $DIR/if-let.rs:30:5 |
b7449926 | 38 | | |
532ac7d7 | 39 | LL | / if let a = 1 { |
0731742a XL |
40 | LL | | println!("irrefutable pattern"); |
41 | LL | | } else if true { | |
42 | LL | | println!("else-if in irrefutable if-let"); | |
43 | LL | | } else { | |
44 | LL | | println!("else in irrefutable if-let"); | |
45 | LL | | } | |
46 | | |_____^ | |
b7449926 | 47 | |
0731742a | 48 | warning: irrefutable if-let pattern |
e74abb32 | 49 | --> $DIR/if-let.rs:40:12 |
b7449926 | 50 | | |
532ac7d7 | 51 | LL | } else if let a = 1 { |
0731742a XL |
52 | | ____________^ |
53 | LL | | println!("irrefutable pattern"); | |
54 | LL | | } | |
55 | | |_____^ | |
b7449926 | 56 | |
0731742a | 57 | warning: irrefutable if-let pattern |
e74abb32 | 58 | --> $DIR/if-let.rs:46:12 |
0731742a | 59 | | |
532ac7d7 | 60 | LL | } else if let a = 1 { |
0731742a XL |
61 | | ____________^ |
62 | LL | | println!("irrefutable pattern"); | |
63 | LL | | } | |
64 | | |_____^ | |
b7449926 | 65 | |
ba9703b0 XL |
66 | warning: 6 warnings emitted |
67 |