about summary refs log tree commit diff
path: root/tests/ui/error-codes
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2024-11-04 20:40:45 -0800
committerGitHub <noreply@github.com>2024-11-04 20:40:45 -0800
commitc17cf1d84ec8fd9ba4e0a1bf739605861ed2a1a2 (patch)
tree44e6abf026d18fa8c0347fa381693161c18ac484 /tests/ui/error-codes
parent972fef232ec0dd7a3f42091aa6f36cd68aeb3eef (diff)
parent10b60eba9bc55449721db912fe75bab11de43c4e (diff)
downloadrust-c17cf1d84ec8fd9ba4e0a1bf739605861ed2a1a2.tar.gz
rust-c17cf1d84ec8fd9ba4e0a1bf739605861ed2a1a2.zip
Rollup merge of #132025 - duncpro:E0027, r=compiler-errors
fix suggestion for diagnostic error E0027

Closes #132008
Diffstat (limited to 'tests/ui/error-codes')
-rw-r--r--tests/ui/error-codes/E0027.stderr16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0027.stderr b/tests/ui/error-codes/E0027.stderr
index 9ae97e4a994..7bbafcf0a27 100644
--- a/tests/ui/error-codes/E0027.stderr
+++ b/tests/ui/error-codes/E0027.stderr
@@ -10,6 +10,10 @@ LL |         Dog { age: x, name } => {}
    |                     ~~~~~~~~
 help: if you don't care about this missing field, you can explicitly ignore it
    |
+LL |         Dog { age: x, name: _ } => {}
+   |                     ~~~~~~~~~~~
+help: or always ignore missing fields here
+   |
 LL |         Dog { age: x, .. } => {}
    |                     ~~~~~~
 
@@ -25,6 +29,10 @@ LL |         Dog { name: x, age } => {}
    |                      ~~~~~~~
 help: if you don't care about this missing field, you can explicitly ignore it
    |
+LL |         Dog { name: x, age: _ } => {}
+   |                      ~~~~~~~~~~
+help: or always ignore missing fields here
+   |
 LL |         Dog { name: x, .. } => {}
    |                      ~~~~~~
 
@@ -40,6 +48,10 @@ LL |         Dog { name: x, age } => {}
    |                      ~~~~~~~
 help: if you don't care about this missing field, you can explicitly ignore it
    |
+LL |         Dog { name: x, age: _ } => {}
+   |                      ~~~~~~~~~~
+help: or always ignore missing fields here
+   |
 LL |         Dog { name: x, .. } => {}
    |                      ~~~~~~
 
@@ -55,6 +67,10 @@ LL |         Dog { name, age } => {}
    |             ~~~~~~~~~~~~~
 help: if you don't care about these missing fields, you can explicitly ignore them
    |
+LL |         Dog { name: _, age: _ } => {}
+   |             ~~~~~~~~~~~~~~~~~~~
+help: or always ignore missing fields here
+   |
 LL |         Dog { .. } => {}
    |             ~~~~~~