fork/rust

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

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

master
1.1 KiB34 linesraw
1error: irrefutable `if let` pattern
2  --> $DIR/deny-irrefutable-let-patterns.rs:6:8
3   |
4LL |     if let _ = 5 {}
5   |        ^^^^^^^^^
6   |
7   = note: this pattern will always match, so the `if let` is useless
8   = help: consider replacing the `if let` with a `let`
9note: the lint level is defined here
10  --> $DIR/deny-irrefutable-let-patterns.rs:3:9
11   |
12LL | #![deny(irrefutable_let_patterns)]
13   |         ^^^^^^^^^^^^^^^^^^^^^^^^
14
15error: irrefutable `while let` pattern
16  --> $DIR/deny-irrefutable-let-patterns.rs:8:11
17   |
18LL |     while let _ = 5 {
19   |           ^^^^^^^^^
20   |
21   = note: this pattern will always match, so the loop will never exit
22   = help: consider instead using a `loop { ... }` with a `let` inside it
23
24error: irrefutable `if let` guard pattern
25  --> $DIR/deny-irrefutable-let-patterns.rs:13:18
26   |
27LL |         _ if let _ = 2 => {}
28   |                  ^
29   |
30   = note: this pattern will always match, so the guard is useless
31   = help: consider removing the guard and adding a `let` inside the match arm
32
33error: aborting due to 3 previous errors
34