Files
rust/tests/ui/consts/match_ice.rs

18 lines
287 B
Rust
Raw Normal View History

2019-01-14 17:54:00 +01:00
// https://github.com/rust-lang/rust/issues/53708
struct S;
2019-04-19 14:53:34 -07:00
#[derive(PartialEq, Eq)]
struct T;
2019-01-14 17:54:00 +01:00
fn main() {
const C: &S = &S;
2019-04-19 14:53:34 -07:00
match C {
C => {} //~ ERROR constant of non-structural type `S` in a pattern
2019-04-19 14:53:34 -07:00
}
const K: &T = &T;
match K {
2019-04-19 14:53:34 -07:00
K => {}
2019-01-14 17:54:00 +01:00
}
}