Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
bring back plural 'alternatives' in suggestion message
  • Loading branch information
karolzwolak committed Oct 2, 2025
commit d1d7b9472a18780499162b4a91beea729bc2c13b
2 changes: 1 addition & 1 deletion compiler/rustc_parse/src/parser/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2961,7 +2961,7 @@ impl<'a> Parser<'a> {
if let CommaRecoveryMode::EitherTupleOrPipe = rt {
err.span_suggestion(
comma_span,
"...or a vertical bar to match on alternative",
"...or a vertical bar to match on alternatives",
" |",
Applicability::MachineApplicable,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ help: try adding parentheses to match on a tuple...
|
LL | (Nucleotide::Adenine, Nucleotide::Cytosine, _) => true
| + +
help: ...or a vertical bar to match on alternative
help: ...or a vertical bar to match on alternatives
|
LL - Nucleotide::Adenine, Nucleotide::Cytosine, _ => true
LL + Nucleotide::Adenine | Nucleotide::Cytosine, _ => true
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/feature-gates/feature-gate-never_patterns.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ help: try adding parentheses to match on a tuple...
|
LL | (Some(_),)
| + +
help: ...or a vertical bar to match on alternative
help: ...or a vertical bar to match on alternatives
|
LL - Some(_),
LL + Some(_) |
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/parser/match-arm-without-body.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ help: try adding parentheses to match on a tuple...
|
LL | (Some(_),)
| + +
help: ...or a vertical bar to match on alternative
help: ...or a vertical bar to match on alternatives
|
LL - Some(_),
LL + Some(_) |
Expand All @@ -36,7 +36,7 @@ LL |
LL |
LL ~ _) => {}
|
help: ...or a vertical bar to match on alternative
help: ...or a vertical bar to match on alternatives
|
LL - Some(_),
LL + Some(_) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ help: try adding parentheses to match on a tuple...
|
LL | (Foo { x: 2, ch: ',' }, Foo { x: 3, ch: '@' }) => (),
| + +
help: ...or a vertical bar to match on alternative
help: ...or a vertical bar to match on alternatives
|
LL - Foo { x: 2, ch: ',' }, Foo { x: 3, ch: '@' } => (),
LL + Foo { x: 2, ch: ',' } | Foo { x: 3, ch: '@' } => (),
Expand Down
Loading