2021-01-20 20:49:11 -06:00
|
|
|
struct S(i32, f32);
|
|
|
|
enum E {
|
|
|
|
S(i32, f32),
|
|
|
|
}
|
|
|
|
fn main() {
|
|
|
|
let x = E::S(1, 2.2);
|
|
|
|
match x {
|
|
|
|
E::S { 0, 1 } => {}
|
2021-02-14 12:14:11 -06:00
|
|
|
//~^ ERROR tuple variant `E::S` written as struct variant [E0769]
|
2021-01-20 20:49:11 -06:00
|
|
|
}
|
|
|
|
let y = S(1, 2.2);
|
|
|
|
match y {
|
|
|
|
S { } => {} //~ ERROR: tuple variant `S` written as struct variant [E0769]
|
|
|
|
}
|
|
|
|
}
|