mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
19 lines
477 B
Rust
19 lines
477 B
Rust
//@ 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
|
|
}
|