Skip to content

Commit d1d7b94

Browse files
committed
bring back plural 'alternatives' in suggestion message
1 parent 5a8f963 commit d1d7b94

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

compiler/rustc_parse/src/parser/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2961,7 +2961,7 @@ impl<'a> Parser<'a> {
29612961
if let CommaRecoveryMode::EitherTupleOrPipe = rt {
29622962
err.span_suggestion(
29632963
comma_span,
2964-
"...or a vertical bar to match on alternative",
2964+
"...or a vertical bar to match on alternatives",
29652965
" |",
29662966
Applicability::MachineApplicable,
29672967
);

tests/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ help: try adding parentheses to match on a tuple...
3232
|
3333
LL | (Nucleotide::Adenine, Nucleotide::Cytosine, _) => true
3434
| + +
35-
help: ...or a vertical bar to match on alternative
35+
help: ...or a vertical bar to match on alternatives
3636
|
3737
LL - Nucleotide::Adenine, Nucleotide::Cytosine, _ => true
3838
LL + Nucleotide::Adenine | Nucleotide::Cytosine, _ => true

tests/ui/feature-gates/feature-gate-never_patterns.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ help: try adding parentheses to match on a tuple...
88
|
99
LL | (Some(_),)
1010
| + +
11-
help: ...or a vertical bar to match on alternative
11+
help: ...or a vertical bar to match on alternatives
1212
|
1313
LL - Some(_),
1414
LL + Some(_) |

tests/ui/parser/match-arm-without-body.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ help: try adding parentheses to match on a tuple...
1616
|
1717
LL | (Some(_),)
1818
| + +
19-
help: ...or a vertical bar to match on alternative
19+
help: ...or a vertical bar to match on alternatives
2020
|
2121
LL - Some(_),
2222
LL + Some(_) |
@@ -36,7 +36,7 @@ LL |
3636
LL |
3737
LL ~ _) => {}
3838
|
39-
help: ...or a vertical bar to match on alternative
39+
help: ...or a vertical bar to match on alternatives
4040
|
4141
LL - Some(_),
4242
LL + Some(_) |

tests/ui/suggestions/only-replace-intended-coma-not-all-in-pattern.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ help: try adding parentheses to match on a tuple...
88
|
99
LL | (Foo { x: 2, ch: ',' }, Foo { x: 3, ch: '@' }) => (),
1010
| + +
11-
help: ...or a vertical bar to match on alternative
11+
help: ...or a vertical bar to match on alternatives
1212
|
1313
LL - Foo { x: 2, ch: ',' }, Foo { x: 3, ch: '@' } => (),
1414
LL + Foo { x: 2, ch: ',' } | Foo { x: 3, ch: '@' } => (),

0 commit comments

Comments
 (0)