diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:50 +0000 |
commit | 2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35 (patch) | |
tree | d325add32978dbdc1db975a438b3a77d571b1ab8 /tests/ui/structs-enums | |
parent | Releasing progress-linux version 1.68.2+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.tar.xz rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.zip |
Merging upstream version 1.69.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
3 files changed, 10 insertions, 20 deletions
diff --git a/tests/ui/structs-enums/rec-align-u64.rs b/tests/ui/structs-enums/rec-align-u64.rs index 40ede9705..f21c9b2c8 100644 --- a/tests/ui/structs-enums/rec-align-u64.rs +++ b/tests/ui/structs-enums/rec-align-u64.rs @@ -43,7 +43,9 @@ struct Outer { target_os = "netbsd", target_os = "openbsd", target_os = "solaris", - target_os = "vxworks"))] + target_os = "vxworks", + target_os = "nto", +))] mod m { #[cfg(target_arch = "x86")] pub mod m { diff --git a/tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.rs b/tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.rs index c30b8a1e1..b569993c6 100644 --- a/tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.rs +++ b/tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.rs @@ -7,6 +7,5 @@ fn main() { let foo = Some(Foo::Other); if let Some(Foo::Bar {_}) = foo {} - //~^ ERROR expected identifier, found reserved identifier `_` - //~| ERROR pattern does not mention field `bar` [E0027] + //~^ ERROR expected field pattern, found `_` } diff --git a/tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.stderr b/tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.stderr index 16f751444..2f3a150e5 100644 --- a/tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.stderr +++ b/tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.stderr @@ -1,24 +1,13 @@ -error: expected identifier, found reserved identifier `_` +error: expected field pattern, found `_` --> $DIR/struct-enum-ignoring-field-with-underscore.rs:9:27 | LL | if let Some(Foo::Bar {_}) = foo {} - | ^ expected identifier, found reserved identifier - -error[E0027]: pattern does not mention field `bar` - --> $DIR/struct-enum-ignoring-field-with-underscore.rs:9:17 - | -LL | if let Some(Foo::Bar {_}) = foo {} - | ^^^^^^^^^^^^ missing field `bar` - | -help: include the missing field in the pattern + | ^ | -LL | if let Some(Foo::Bar {_, bar }) = foo {} - | ~~~~~~~ -help: if you don't care about this missing field, you can explicitly ignore it +help: to omit remaining fields, use `..` | -LL | if let Some(Foo::Bar {_, .. }) = foo {} - | ~~~~~~ +LL | if let Some(Foo::Bar {..}) = foo {} + | ~~ -error: aborting due to 2 previous errors +error: aborting due to previous error -For more information about this error, try `rustc --explain E0027`. |