Fix test for PR #49268
This commit is contained in:
parent
f8fc5c0523
commit
3d0ccb2a22
2 changed files with 4 additions and 11 deletions
|
@ -18,6 +18,5 @@ struct Point { x: u8, y: u8 }
|
||||||
fn main() {
|
fn main() {
|
||||||
let p = Point { x: 0, y: 0 };
|
let p = Point { x: 0, y: 0 };
|
||||||
let Point { .., y } = p; //~ ERROR expected `}`, found `,`
|
let Point { .., y } = p; //~ ERROR expected `}`, found `,`
|
||||||
//~| ERROR pattern does not mention field `x`
|
//~| ERROR pattern does not mention fields `x`, `y`
|
||||||
//~| ERROR pattern does not mention field `y`
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,18 +4,12 @@ error: expected `}`, found `,`
|
||||||
LL | let Point { .., y } = p; //~ ERROR expected `}`, found `,`
|
LL | let Point { .., y } = p; //~ ERROR expected `}`, found `,`
|
||||||
| ^ `..` must be in the last position, and cannot have a trailing comma
|
| ^ `..` 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
|
--> $DIR/issue-49257.rs:20:9
|
||||||
|
|
|
|
||||||
LL | let Point { .., y } = p; //~ ERROR expected `}`, found `,`
|
LL | let Point { .., y } = p; //~ ERROR expected `}`, found `,`
|
||||||
| ^^^^^^^^^^^^^^^ missing field `x`
|
| ^^^^^^^^^^^^^^^ missing fields `x`, `y`
|
||||||
|
|
||||||
error[E0027]: pattern does not mention field `y`
|
error: aborting due to 2 previous errors
|
||||||
--> $DIR/issue-49257.rs:20:9
|
|
||||||
|
|
|
||||||
LL | let Point { .., y } = p; //~ ERROR expected `}`, found `,`
|
|
||||||
| ^^^^^^^^^^^^^^^ missing field `y`
|
|
||||||
|
|
||||||
error: aborting due to 3 previous errors
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0027`.
|
For more information about this error, try `rustc --explain E0027`.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue