fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
1008 B32 linesraw
1warning[E0170]: pattern binding `A` is named the same as one of the variants of the type `E`
2  --> $DIR/issue-14221.rs:13:13
3   |
4LL |             A => "A",
5   |             ^ help: to match on the variant, qualify the path: `E::A`
6   |
7   = note: `#[warn(bindings_with_variant_name)]` on by default
8
9warning[E0170]: pattern binding `B` is named the same as one of the variants of the type `E`
10  --> $DIR/issue-14221.rs:15:13
11   |
12LL |             B => "B",
13   |             ^ help: to match on the variant, qualify the path: `E::B`
14
15error: unreachable pattern
16  --> $DIR/issue-14221.rs:15:13
17   |
18LL |             A => "A",
19   |             - matches any value
20LL |
21LL |             B => "B",
22   |             ^ unreachable pattern
23   |
24note: the lint level is defined here
25  --> $DIR/issue-14221.rs:1:9
26   |
27LL | #![deny(unreachable_patterns)]
28   |         ^^^^^^^^^^^^^^^^^^^^
29
30error: aborting due to previous error; 2 warnings emitted
31
32For more information about this error, try `rustc --explain E0170`.