about summary refs log tree commit diff
path: root/src/test/ui/destructuring-assignment
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2021-01-26 11:24:43 -0800
committerEsteban Küber <esteban@kuber.com.ar>2021-01-26 11:27:53 -0800
commit0959f0f912c1029f0dfd3de431786433211a1f2d (patch)
tree7e3b8585ca59f3c85270f3340aac37feb7dd2828 /src/test/ui/destructuring-assignment
parent7907345e58b4f4d2c95e5ea9b8e0b3bff8946523 (diff)
downloadrust-0959f0f912c1029f0dfd3de431786433211a1f2d.tar.gz
rust-0959f0f912c1029f0dfd3de431786433211a1f2d.zip
Tweak suggestion for missing field in patterns
Account for parser recovered struct and tuple patterns to avoid invalid
suggestion.

Follow up to #81103.
Diffstat (limited to 'src/test/ui/destructuring-assignment')
-rw-r--r--src/test/ui/destructuring-assignment/struct_destructure_fail.stderr8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ui/destructuring-assignment/struct_destructure_fail.stderr b/src/test/ui/destructuring-assignment/struct_destructure_fail.stderr
index c0955ef8b06..8a83e145ea2 100644
--- a/src/test/ui/destructuring-assignment/struct_destructure_fail.stderr
+++ b/src/test/ui/destructuring-assignment/struct_destructure_fail.stderr
@@ -32,12 +32,12 @@ LL |     Struct { a, _ } = Struct { a: 1, b: 2 };
    |
 help: include the missing field in the pattern
    |
-LL |     Struct { a, b _ } = Struct { a: 1, b: 2 };
-   |               ^^^
+LL |     Struct { a, b } = Struct { a: 1, b: 2 };
+   |               ^^^^^
 help: if you don't care about this missing field, you can explicitly ignore it
    |
-LL |     Struct { a, .. _ } = Struct { a: 1, b: 2 };
-   |               ^^^^
+LL |     Struct { a, .. } = Struct { a: 1, b: 2 };
+   |               ^^^^^^
 
 error: aborting due to 5 previous errors