blob: 1d8ecf8ae6640e10ac8aef8d87c47e2c8b3b9984 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// run-pass
// aux-build:consts.rs
#![warn(indirect_structural_match)]
extern crate consts;
use consts::CustomEq;
struct Defaulted;
impl consts::AssocConst for Defaulted {}
fn main() {
let _ = Defaulted;
match Some(CustomEq) {
consts::NONE => panic!(),
_ => {}
}
match Some(CustomEq) {
<Defaulted as consts::AssocConst>::NONE => panic!(),
_ => {}
}
}
|