blob: f09dcf8498f3876d3003102444d6f0fdd5361b04 [file] [log] [blame]
#![allow(warnings)]
struct MyType;
impl PartialEq<usize> for MyType {
fn eq(&self, y: &usize) -> bool {
true
}
}
const CONSTANT: &&MyType = &&MyType;
fn main() {
if let CONSTANT = &&MyType {
//~^ ERROR constant of non-structural type `MyType` in a pattern
println!("did match!");
}
}