]>
Commit | Line | Data |
---|---|---|
f2b60f7d FG |
1 | #[derive(PartialEq)] |
2 | enum E { | |
3 | A, | |
4 | } | |
5 | ||
6 | const E_SL: &[E] = &[E::A]; | |
7 | ||
8 | fn main() { | |
9 | match &[][..] { | |
10 | //~^ ERROR non-exhaustive patterns: `&_` not covered [E0004] | |
11 | E_SL => {} | |
12 | //~^ WARN to use a constant of type `E` in a pattern, `E` must be annotated with `#[derive(PartialEq, Eq)]` | |
13 | //~| WARN this was previously accepted by the compiler but is being phased out | |
14 | } | |
15 | } |