Skip to content

Commit 37fa028

Browse files
committed
Fix grammar in suggestion message
1 parent bc5f526 commit 37fa028

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

compiler/rustc_resolve/src/late/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1411,7 +1411,7 @@ impl<'ast, 'ra, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
14111411

14121412
err.span_suggestion_verbose(
14131413
pat.span,
1414-
"if you meant to destructure a `Range`, use the struct pattern",
1414+
"if you meant to destructure a `Range`, use a struct pattern",
14151415
format!("std::ops::Range {{ start: {}, end: {} }}", start_name, end_name),
14161416
Applicability::MaybeIncorrect,
14171417
);

tests/ui/resolve/suggest-range-struct-destructuring.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0425]: cannot find value `start` in this scope
44
LL | let start..end = r;
55
| ^^^^^ not found in this scope
66
|
7-
help: if you meant to destructure a `Range`, use the struct pattern
7+
help: if you meant to destructure a `Range`, use a struct pattern
88
|
99
LL - let start..end = r;
1010
LL + let std::ops::Range { start: start, end: end } = r;
@@ -16,7 +16,7 @@ error[E0425]: cannot find value `end` in this scope
1616
LL | let start..end = r;
1717
| ^^^ not found in this scope
1818
|
19-
help: if you meant to destructure a `Range`, use the struct pattern
19+
help: if you meant to destructure a `Range`, use a struct pattern
2020
|
2121
LL - let start..end = r;
2222
LL + let std::ops::Range { start: start, end: end } = r;
@@ -31,7 +31,7 @@ LL | let min..max = r;
3131
LL | fn main() {}
3232
| --------- similarly named function `main` defined here
3333
|
34-
help: if you meant to destructure a `Range`, use the struct pattern
34+
help: if you meant to destructure a `Range`, use a struct pattern
3535
|
3636
LL - let min..max = r;
3737
LL + let std::ops::Range { start: min, end: max } = r;
@@ -51,7 +51,7 @@ error[E0425]: cannot find value `max` in this scope
5151
LL | let min..max = r;
5252
| ^^^ not found in this scope
5353
|
54-
help: if you meant to destructure a `Range`, use the struct pattern
54+
help: if you meant to destructure a `Range`, use a struct pattern
5555
|
5656
LL - let min..max = r;
5757
LL + let std::ops::Range { start: min, end: max } = r;

0 commit comments

Comments
 (0)