blob: 74cfeb6db8e3b2945ed8cde770c36014585fce35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// 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 or tuple variant, found constant `C1`
if let S::C2(..) = 0 {}
//~^ ERROR expected tuple struct or tuple variant, found associated constant `S::C2`
}
|