let (fields, etc) = self.parse_pat_fields().unwrap_or_else(|mut e| {
e.emit();
self.recover_stmt();
- (vec![], false)
+ (vec![], true)
});
self.bump();
pat = PatKind::Struct(path, fields, etc);
struct Foo { x: isize }
match (Foo { x: 10 }) {
Foo { ref x: ref x } => {}, //~ ERROR expected `,`
- //~| ERROR pattern does not mention field `x`
_ => {}
}
}
LL | Foo { ref x: ref x } => {},
| ^
-error[E0027]: pattern does not mention field `x`
- --> $DIR/bind-struct-early-modifiers.rs:4:9
- |
-LL | Foo { ref x: ref x } => {},
- | ^^^^^^^^^^^^^^^^^^^^ missing field `x`
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
-For more information about this error, try `rustc --explain E0027`.
fn main() {
let A { , } = a(); //~ ERROR expected ident
- //~| ERROR pattern does not mention field `foo`
}
LL | let A { , } = a();
| ^ expected identifier
-error[E0027]: pattern does not mention field `foo`
- --> $DIR/issue-10392.rs:6:9
- |
-LL | let A { , } = a();
- | ^^^^^^^ missing field `foo`
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
-For more information about this error, try `rustc --explain E0027`.
let thing = MyStruct { s1: None };
match thing {
- MyStruct { .., Some(_) } => {}, //~ ERROR pattern does not mention field `s1`
+ MyStruct { .., Some(_) } => {},
//~^ ERROR expected `,`
//~| ERROR expected `}`, found `,`
_ => {}
LL | MyStruct { .., Some(_) } => {},
| ^^^^
-error[E0027]: pattern does not mention field `s1`
- --> $DIR/issue-54379.rs:9:9
- |
-LL | MyStruct { .., Some(_) } => {},
- | ^^^^^^^^^^^^^^^^^^^^^^^^ missing field `s1`
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
-For more information about this error, try `rustc --explain E0027`.