2022-11-08 15:24:06 +00:00
|
|
|
error[E0170]: pattern binding `A` is named the same as one of the variants of the type `E`
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/issue-14221.rs:13:13
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
|
|
|
LL | A => "A",
|
|
|
|
| ^ help: to match on the variant, qualify the path: `E::A`
|
2019-12-31 20:25:16 +00:00
|
|
|
|
|
2022-11-08 15:24:06 +00:00
|
|
|
= note: `#[deny(bindings_with_variant_name)]` on by default
|
2018-07-15 21:11:54 +00:00
|
|
|
|
2022-11-08 15:24:06 +00:00
|
|
|
error[E0170]: pattern binding `B` is named the same as one of the variants of the type `E`
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/issue-14221.rs:15:13
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | B => "B",
|
2018-07-15 21:11:54 +00:00
|
|
|
| ^ help: to match on the variant, qualify the path: `E::B`
|
|
|
|
|
|
|
|
error: unreachable pattern
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/issue-14221.rs:15:13
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
|
|
|
LL | A => "A",
|
|
|
|
| - matches any value
|
2019-03-09 12:03:44 +00:00
|
|
|
LL |
|
|
|
|
LL | B => "B",
|
2018-07-15 21:11:54 +00:00
|
|
|
| ^ unreachable pattern
|
|
|
|
|
|
2020-01-22 23:57:38 +00:00
|
|
|
note: the lint level is defined here
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/issue-14221.rs:1:9
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
|
|
|
LL | #![deny(unreachable_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2022-11-08 15:24:06 +00:00
|
|
|
error: aborting due to 3 previous errors
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0170`.
|