blob: f02e780f30e38591e293220931e3449bf6c61d5e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
//@ aux-build:consts.rs
extern crate consts;
struct Defaulted;
impl consts::AssocConst for Defaulted {}
fn main() {
let _ = Defaulted;
match None {
consts::SOME => panic!(),
//~^ ERROR constant of non-structural type `CustomEq` in a pattern
_ => {}
}
match None {
<Defaulted as consts::AssocConst>::SOME => panic!(),
//~^ ERROR constant of non-structural type `CustomEq` in a pattern
_ => {}
}
}
|