fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.1 KiB69 linesraw
1warning: irrefutable `if let` pattern
2  --> $DIR/if-let.rs:6:16
3   |
4LL |               if let $p = $e $b
5   |                  ^^^
6...
7LL | /     foo!(a, 1, {
8LL | |         println!("irrefutable pattern");
9LL | |     });
10   | |______- in this macro invocation
11   |
12   = note: this pattern will always match, so the `if let` is useless
13   = help: consider replacing the `if let` with a `let`
14   = note: `#[warn(irrefutable_let_patterns)]` on by default
15   = note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
16
17warning: irrefutable `if let` pattern
18  --> $DIR/if-let.rs:6:16
19   |
20LL |               if let $p = $e $b
21   |                  ^^^
22...
23LL | /     bar!(a, 1, {
24LL | |         println!("irrefutable pattern");
25LL | |     });
26   | |______- in this macro invocation
27   |
28   = note: this pattern will always match, so the `if let` is useless
29   = help: consider replacing the `if let` with a `let`
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)
31
32warning: irrefutable `if let` pattern
33  --> $DIR/if-let.rs:26:8
34   |
35LL |     if let a = 1 {
36   |        ^^^^^^^^^
37   |
38   = note: this pattern will always match, so the `if let` is useless
39   = help: consider replacing the `if let` with a `let`
40
41warning: irrefutable `if let` pattern
42  --> $DIR/if-let.rs:30:8
43   |
44LL |     if let a = 1 {
45   |        ^^^^^^^^^
46   |
47   = note: this pattern will always match, so the `if let` is useless
48   = help: consider replacing the `if let` with a `let`
49
50warning: irrefutable `if let` pattern
51  --> $DIR/if-let.rs:40:15
52   |
53LL |     } else if let a = 1 {
54   |               ^^^^^^^^^
55   |
56   = note: this pattern will always match, so the `if let` is useless
57   = help: consider replacing the `if let` with a `let`
58
59warning: irrefutable `if let` pattern
60  --> $DIR/if-let.rs:46:15
61   |
62LL |     } else if let a = 1 {
63   |               ^^^^^^^^^
64   |
65   = note: this pattern will always match, so the `if let` is useless
66   = help: consider replacing the `if let` with a `let`
67
68warning: 6 warnings emitted
69