2018-10-06 17:05:42 -05:00
|
|
|
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 `,`
|
2018-10-06 17:05:42 -05:00
|
|
|
_ => {}
|
|
|
|
}
|
|
|
|
}
|