]> git.lizzy.rs Git - rust.git/blob - tests/ui/structs/struct-tuple-field-names.rs
internally change regions to be covariant
[rust.git] / tests / 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 }