]>
Commit | Line | Data |
---|---|---|
9fa01778 XL |
1 | // https://github.com/rust-lang/rust/issues/53708 |
2 | ||
3 | struct S; | |
4 | ||
48663c56 XL |
5 | #[derive(PartialEq, Eq)] |
6 | struct T; | |
7 | ||
9fa01778 XL |
8 | fn main() { |
9 | const C: &S = &S; | |
48663c56 XL |
10 | match C { |
11 | C => {} | |
12 | //~^ ERROR to use a constant of type `S` in a pattern, `S` must be annotated with | |
13 | } | |
14 | const K: &T = &T; | |
15 | match K { //~ ERROR non-exhaustive patterns: `&T` not covered | |
16 | K => {} | |
9fa01778 XL |
17 | } |
18 | } |