Skip to content

Commit a737832

Browse files
committed
field -> value
1 parent e2a47d1 commit a737832

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

compiler/rustc_hir_typeck/src/pat.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2069,7 +2069,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
20692069
err.span_suggestion(
20702070
sp,
20712071
format!(
2072-
"if the field{s} {are} not relevant, discard {them} explicitly",
2072+
"if the value{s} {are} not relevant, discard {them} explicitly",
20732073
are = if len == 1 { "is" } else { "are" },
20742074
s = pluralize!(len),
20752075
them = if len == 1 { "it" } else { "them" },

tests/ui/error-codes/E0027.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ help: include the missing field in the pattern
88
|
99
LL | Dog { age: x, name } => {}
1010
| ~~~~~~~~
11-
help: if the field is not relevant, discard it explicitly
11+
help: if the value is not relevant, discard it explicitly
1212
|
1313
LL | Dog { age: x, name: _ } => {}
1414
| ~~~~~~~~~~~
@@ -27,7 +27,7 @@ help: include the missing field in the pattern
2727
|
2828
LL | Dog { name: x, age } => {}
2929
| ~~~~~~~
30-
help: if the field is not relevant, discard it explicitly
30+
help: if the value is not relevant, discard it explicitly
3131
|
3232
LL | Dog { name: x, age: _ } => {}
3333
| ~~~~~~~~~~
@@ -46,7 +46,7 @@ help: include the missing field in the pattern
4646
|
4747
LL | Dog { name: x, age } => {}
4848
| ~~~~~~~
49-
help: if the field is not relevant, discard it explicitly
49+
help: if the value is not relevant, discard it explicitly
5050
|
5151
LL | Dog { name: x, age: _ } => {}
5252
| ~~~~~~~~~~
@@ -65,7 +65,7 @@ help: include the missing fields in the pattern
6565
|
6666
LL | Dog { name, age } => {}
6767
| ~~~~~~~~~~~~~
68-
help: if the fields are not relevant, discard them explicitly
68+
help: if the values are not relevant, discard them explicitly
6969
|
7070
LL | Dog { name: _, age: _ } => {}
7171
| ~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)