mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 09:44:08 +00:00
16 lines
400 B
Rust
16 lines
400 B
Rust
#[derive(PartialEq)]
|
|
enum E {
|
|
A,
|
|
}
|
|
|
|
const E_SL: &[E] = &[E::A];
|
|
|
|
fn main() {
|
|
match &[][..] {
|
|
//~^ ERROR non-exhaustive patterns: `&_` not covered [E0004]
|
|
E_SL => {}
|
|
//~^ WARN to use a constant of type `E` in a pattern, `E` must be annotated with `#[derive(PartialEq, Eq)]`
|
|
//~| WARN this was previously accepted by the compiler but is being phased out
|
|
}
|
|
}
|