summaryrefslogtreecommitdiffstats
path: root/tests/ui/structs/struct-tuple-field-names.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/structs/struct-tuple-field-names.stderr')
-rw-r--r--tests/ui/structs/struct-tuple-field-names.stderr20
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/ui/structs/struct-tuple-field-names.stderr b/tests/ui/structs/struct-tuple-field-names.stderr
index 5494c29a6..0b837a47a 100644
--- a/tests/ui/structs/struct-tuple-field-names.stderr
+++ b/tests/ui/structs/struct-tuple-field-names.stderr
@@ -20,6 +20,22 @@ help: use the tuple variant pattern syntax instead
LL | S(_, _) => {}
| ~~~~~~
-error: aborting due to 2 previous errors
+error[E0027]: pattern does not mention field `1`
+ --> $DIR/struct-tuple-field-names.rs:16:12
+ |
+LL | if let E::S { 0: a } = x {
+ | ^^^^^^^^^^^^^ missing field `1`
+ |
+help: include the missing field in the pattern
+ |
+LL | if let E::S { 0: a, 1: _ } = x {
+ | ~~~~~~~~
+help: if you don't care about this missing field, you can explicitly ignore it
+ |
+LL | if let E::S { 0: a, .. } = x {
+ | ~~~~~~
+
+error: aborting due to 3 previous errors
-For more information about this error, try `rustc --explain E0769`.
+Some errors have detailed explanations: E0027, E0769.
+For more information about an error, try `rustc --explain E0027`.