]>
Commit | Line | Data |
---|---|---|
f9f354fc XL |
1 | // aux-build:consts.rs |
2 | ||
3 | #![warn(indirect_structural_match)] | |
4 | ||
5 | extern crate consts; | |
6 | ||
7 | struct Defaulted; | |
8 | impl consts::AssocConst for Defaulted {} | |
9 | ||
10 | fn main() { | |
11 | let _ = Defaulted; | |
12 | match None { | |
13 | consts::SOME => panic!(), | |
14 | //~^ must be annotated with `#[derive(PartialEq, Eq)]` | |
f9f354fc XL |
15 | |
16 | _ => {} | |
17 | } | |
18 | ||
19 | match None { | |
20 | <Defaulted as consts::AssocConst>::SOME => panic!(), | |
21 | //~^ must be annotated with `#[derive(PartialEq, Eq)]` | |
f9f354fc XL |
22 | |
23 | _ => {} | |
24 | } | |
25 | } |