rust/src/test/ui/resolve/issue-54379.rs

15 lines
304 B
Rust
Raw Normal View History

struct MyStruct {
pub s1: Option<String>,
}
fn main() {
let thing = MyStruct { s1: None };
match thing {
2018-11-27 03:56:36 -06:00
MyStruct { .., Some(_) } => {}, //~ ERROR pattern does not mention field `s1`
//~^ ERROR expected `,`
//~| ERROR expected `}`, found `,`
_ => {}
}
}