blob: 22961fc61d134d531f769dca922ed9a1fcf5466e [file] [log] [blame]
// Can't use constants as tuple struct patterns
const C1: i32 = 0;
struct S;
impl S {
const C2: i32 = 0;
}
fn main() {
if let C1(..) = 0 {} //~ ERROR expected tuple struct/variant, found constant `C1`
if let S::C2(..) = 0 {}
//~^ ERROR expected tuple struct/variant, found associated constant `<S>::C2`
}