summaryrefslogtreecommitdiffstats
path: root/tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
commit4f9fe856a25ab29345b90e7725509e9ee38a37be (patch)
treee4ffd8a9374cae7b21f7cbfb352927e0e074aff6 /tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.stderr
parentAdding upstream version 1.68.2+dfsg1. (diff)
downloadrustc-4f9fe856a25ab29345b90e7725509e9ee38a37be.tar.xz
rustc-4f9fe856a25ab29345b90e7725509e9ee38a37be.zip
Adding upstream version 1.69.0+dfsg1.upstream/1.69.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.stderr23
1 files changed, 6 insertions, 17 deletions
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`.