]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const_in_pattern/cross-crate-fail.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / consts / const_in_pattern / cross-crate-fail.rs
CommitLineData
f9f354fc
XL
1// aux-build:consts.rs
2
3#![warn(indirect_structural_match)]
4
5extern crate consts;
6
7struct Defaulted;
8impl consts::AssocConst for Defaulted {}
9
10fn 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}