Fix tidy error
This commit is contained in:
parent
a9b746bb23
commit
6aafdc3781
1 changed files with 5 additions and 2 deletions
|
@ -3433,8 +3433,11 @@ impl<'a> Parser<'a> {
|
||||||
pats.push(self.parse_pat()?);
|
pats.push(self.parse_pat()?);
|
||||||
|
|
||||||
if self.token == token::OrOr {
|
if self.token == token::OrOr {
|
||||||
let mut err = self.struct_span_err(self.span, "unexpected token `||` after pattern");
|
let mut err = self.struct_span_err(self.span,
|
||||||
err.span_suggestion(self.span, "use a single `|` to specify multiple patterns", "|".to_owned());
|
"unexpected token `||` after pattern");
|
||||||
|
err.span_suggestion(self.span,
|
||||||
|
"use a single `|` to specify multiple patterns",
|
||||||
|
"|".to_owned());
|
||||||
err.emit();
|
err.emit();
|
||||||
self.bump();
|
self.bump();
|
||||||
} else if self.check(&token::BinOp(token::Or)) {
|
} else if self.check(&token::BinOp(token::Or)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue