]> git.proxmox.com Git - rustc.git/blame - src/test/ui/expr/if/if-let.stderr
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / expr / if / if-let.stderr
CommitLineData
6a06907d 1warning: irrefutable `if let` pattern
94222f64 2 --> $DIR/if-let.rs:6:16
b7449926 3 |
0731742a 4LL | if let $p = $e $b
94222f64 5 | ^^^
0731742a 6...
532ac7d7 7LL | / foo!(a, 1, {
0731742a
XL
8LL | | println!("irrefutable pattern");
9LL | | });
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 17warning: irrefutable `if let` pattern
94222f64 18 --> $DIR/if-let.rs:6:16
b7449926 19 |
0731742a 20LL | if let $p = $e $b
94222f64 21 | ^^^
0731742a 22...
532ac7d7 23LL | / bar!(a, 1, {
0731742a
XL
24LL | | println!("irrefutable pattern");
25LL | | });
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 32warning: irrefutable `if let` pattern
94222f64 33 --> $DIR/if-let.rs:26:8
b7449926 34 |
94222f64
XL
35LL | 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 41warning: irrefutable `if let` pattern
94222f64 42 --> $DIR/if-let.rs:30:8
b7449926 43 |
94222f64
XL
44LL | 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 50warning: irrefutable `if let` pattern
94222f64 51 --> $DIR/if-let.rs:40:15
b7449926 52 |
94222f64
XL
53LL | } 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 59warning: irrefutable `if let` pattern
94222f64 60 --> $DIR/if-let.rs:46:15
0731742a 61 |
94222f64
XL
62LL | } 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
68warning: 6 warnings emitted
69