rust/src/test/ui/issues/issue-14221.stderr

33 lines
981 B
Plaintext
Raw Normal View History

2018-07-15 14:11:54 -07:00
warning[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`
|
= note: `#[warn(bindings_with_variant_name)]` on by default
2018-07-15 14:11:54 -07:00
warning[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
|
note: lint level 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)]
| ^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0170`.