blob: cf6c2a24fdf52f87bc909d76438221f90e3a83ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// run-rustfix
struct S {
field_name: (),
}
fn main() {
match (S {field_name: ()}) {
S {field_name: ref _foo} => {} //~ ERROR expected `,`
}
match (S {field_name: ()}) {
S {field_name: mut _foo} => {} //~ ERROR expected `,`
}
match (S {field_name: ()}) {
S {field_name: ref mut _foo} => {} //~ ERROR expected `,`
}
// Verify that we recover enough to run typeck.
let _: usize = 3usize; //~ ERROR mismatched types
}
|