diff --git a/src/test/ui/issue-49257.rs b/src/test/ui/issue-49257.rs index 61883294594..a3198492237 100644 --- a/src/test/ui/issue-49257.rs +++ b/src/test/ui/issue-49257.rs @@ -18,6 +18,5 @@ struct Point { x: u8, y: u8 } fn main() { let p = Point { x: 0, y: 0 }; let Point { .., y } = p; //~ ERROR expected `}`, found `,` - //~| ERROR pattern does not mention field `x` - //~| ERROR pattern does not mention field `y` + //~| ERROR pattern does not mention fields `x`, `y` } diff --git a/src/test/ui/issue-49257.stderr b/src/test/ui/issue-49257.stderr index ecaf36520ae..fec990764bb 100644 --- a/src/test/ui/issue-49257.stderr +++ b/src/test/ui/issue-49257.stderr @@ -4,18 +4,12 @@ error: expected `}`, found `,` LL | let Point { .., y } = p; //~ ERROR expected `}`, found `,` | ^ `..` must be in the last position, and cannot have a trailing comma -error[E0027]: pattern does not mention field `x` +error[E0027]: pattern does not mention fields `x`, `y` --> $DIR/issue-49257.rs:20:9 | LL | let Point { .., y } = p; //~ ERROR expected `}`, found `,` - | ^^^^^^^^^^^^^^^ missing field `x` + | ^^^^^^^^^^^^^^^ missing fields `x`, `y` -error[E0027]: pattern does not mention field `y` - --> $DIR/issue-49257.rs:20:9 - | -LL | let Point { .., y } = p; //~ ERROR expected `}`, found `,` - | ^^^^^^^^^^^^^^^ missing field `y` - -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0027`.