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