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