mirror of https://github.com/rust-lang/rust.git
22 lines
469 B
Rust
22 lines
469 B
Rust
//@ 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
|
|
_ => {}
|
|
}
|
|
}
|