bring back plural 'alternatives' in suggestion message

This commit is contained in:
Karol Zwolak 2025-10-02 20:24:34 +02:00
parent 5a8f963426
commit d1d7b9472a
5 changed files with 6 additions and 6 deletions

View file

@ -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,
);

View file

@ -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

View file

@ -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(_) |

View file

@ -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(_) |
@ -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(_) |

View file

@ -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: '@' } => (),