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