]> git.proxmox.com Git - rustc.git/blob - src/test/ui/structs/struct-tuple-field-names.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / structs / struct-tuple-field-names.rs
1 struct S(i32, f32);
2 enum E {
3 S(i32, f32),
4 }
5 fn main() {
6 let x = E::S(1, 2.2);
7 match x {
8 E::S { 0, 1 } => {}
9 //~^ ERROR tuple variant `E::S` written as struct variant [E0769]
10 }
11 let y = S(1, 2.2);
12 match y {
13 S { } => {} //~ ERROR: tuple variant `S` written as struct variant [E0769]
14 }
15 }