]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/match_ice.rs
New upstream version 1.36.0+dfsg1
[rustc.git] / src / test / ui / consts / match_ice.rs
CommitLineData
9fa01778
XL
1// https://github.com/rust-lang/rust/issues/53708
2
3struct S;
4
48663c56
XL
5#[derive(PartialEq, Eq)]
6struct T;
7
9fa01778
XL
8fn 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}