mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
bring back plural 'alternatives' in suggestion message
This commit is contained in:
@@ -2961,7 +2961,7 @@ pub(crate) fn maybe_recover_unexpected_comma(
|
||||
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,
|
||||
);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(_) |
|
||||
|
||||
@@ -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(_) |
|
||||
|
||||
@@ -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: '@' } => (),
|
||||
|
||||
Reference in New Issue
Block a user