parser: reword || recovery.
This commit is contained in:
parent
e3747722fb
commit
0ab8430332
2 changed files with 8 additions and 8 deletions
|
|
@ -119,7 +119,7 @@ impl<'a> Parser<'a> {
|
|||
self.struct_span_err(self.token.span, "unexpected token `||` after pattern")
|
||||
.span_suggestion(
|
||||
self.token.span,
|
||||
"use a single `|` to specify multiple patterns",
|
||||
"use a single `|` to separate multiple alternative patterns",
|
||||
"|".to_owned(),
|
||||
Applicability::MachineApplicable
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2,43 +2,43 @@ error: unexpected token `||` after pattern
|
|||
--> $DIR/multiple-pattern-typo.rs:8:15
|
||||
|
|
||||
LL | 1 | 2 || 3 => (),
|
||||
| ^^ help: use a single `|` to specify multiple patterns: `|`
|
||||
| ^^ help: use a single `|` to separate multiple alternative patterns: `|`
|
||||
|
||||
error: unexpected token `||` after pattern
|
||||
--> $DIR/multiple-pattern-typo.rs:13:16
|
||||
|
|
||||
LL | (1 | 2 || 3) => (),
|
||||
| ^^ help: use a single `|` to specify multiple patterns: `|`
|
||||
| ^^ help: use a single `|` to separate multiple alternative patterns: `|`
|
||||
|
||||
error: unexpected token `||` after pattern
|
||||
--> $DIR/multiple-pattern-typo.rs:18:16
|
||||
|
|
||||
LL | (1 | 2 || 3,) => (),
|
||||
| ^^ help: use a single `|` to specify multiple patterns: `|`
|
||||
| ^^ help: use a single `|` to separate multiple alternative patterns: `|`
|
||||
|
||||
error: unexpected token `||` after pattern
|
||||
--> $DIR/multiple-pattern-typo.rs:25:18
|
||||
|
|
||||
LL | TS(1 | 2 || 3) => (),
|
||||
| ^^ help: use a single `|` to specify multiple patterns: `|`
|
||||
| ^^ help: use a single `|` to separate multiple alternative patterns: `|`
|
||||
|
||||
error: unexpected token `||` after pattern
|
||||
--> $DIR/multiple-pattern-typo.rs:32:23
|
||||
|
|
||||
LL | NS { f: 1 | 2 || 3 } => (),
|
||||
| ^^ help: use a single `|` to specify multiple patterns: `|`
|
||||
| ^^ help: use a single `|` to separate multiple alternative patterns: `|`
|
||||
|
||||
error: unexpected token `||` after pattern
|
||||
--> $DIR/multiple-pattern-typo.rs:37:16
|
||||
|
|
||||
LL | [1 | 2 || 3] => (),
|
||||
| ^^ help: use a single `|` to specify multiple patterns: `|`
|
||||
| ^^ help: use a single `|` to separate multiple alternative patterns: `|`
|
||||
|
||||
error: unexpected token `||` after pattern
|
||||
--> $DIR/multiple-pattern-typo.rs:42:9
|
||||
|
|
||||
LL | || 1 | 2 | 3 => (),
|
||||
| ^^ help: use a single `|` to specify multiple patterns: `|`
|
||||
| ^^ help: use a single `|` to separate multiple alternative patterns: `|`
|
||||
|
||||
warning: the feature `or_patterns` is incomplete and may cause the compiler to crash
|
||||
--> $DIR/multiple-pattern-typo.rs:1:12
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue