]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/match_ice.rs
Auto merge of #64546 - weiznich:bugfix/rfc-2451-rerebalance-tests, r=nikomatsakis
[rust.git] / src / test / ui / consts / match_ice.rs
1 // https://github.com/rust-lang/rust/issues/53708
2
3 struct S;
4
5 #[derive(PartialEq, Eq)]
6 struct T;
7
8 fn main() {
9     const C: &S = &S;
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 => {}
17     }
18 }