rust/tests/ui/consts/match_ice.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
297 B
Rust
Raw Normal View History

2019-01-14 16:54:00 +00:00
// https://github.com/rust-lang/rust/issues/53708
struct S;
2019-04-19 21:53:34 +00:00
#[derive(PartialEq, Eq)]
struct T;
2019-01-14 16:54:00 +00:00
fn main() {
const C: &S = &S;
2019-04-19 21:53:34 +00:00
match C {
C => {}
//~^ ERROR must be annotated with `#[derive(PartialEq, Eq)]`
2019-04-19 21:53:34 +00:00
}
const K: &T = &T;
match K {
2019-04-19 21:53:34 +00:00
K => {}
2019-01-14 16:54:00 +00:00
}
}