2024-02-16 14:02:50 -06:00
|
|
|
//@ run-rustfix
|
2023-10-27 11:11:43 -05:00
|
|
|
struct S {
|
|
|
|
field_name: (),
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
match (S {field_name: ()}) {
|
|
|
|
S {ref field_name: _foo} => {} //~ ERROR expected `,`
|
|
|
|
}
|
|
|
|
match (S {field_name: ()}) {
|
|
|
|
S {mut field_name: _foo} => {} //~ ERROR expected `,`
|
|
|
|
}
|
|
|
|
match (S {field_name: ()}) {
|
|
|
|
S {ref mut field_name: _foo} => {} //~ ERROR expected `,`
|
|
|
|
}
|
|
|
|
// Verify that we recover enough to run typeck.
|
|
|
|
let _: usize = 3u8; //~ ERROR mismatched types
|
|
|
|
}
|