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
293 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 => {}
2023-09-26 02:39:41 -05:00
//~^ ERROR must be annotated with `#[derive(PartialEq)]`
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
}
}