about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 897f199f25e..adaa5670e80 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3433,9 +3433,9 @@ impl<'a> Parser<'a> {
             pats.push(self.parse_pat()?);
 
             if self.token == token::OrOr {
-                self.span_err_help(self.span,
-                                   "unexpected token `||` after pattern",
-                                   "did you mean to use `|` to specify multiple patterns?");
+                let mut err = self.struct_span_err(self.span, "unexpected token `||` after pattern");
+                err.span_suggestion(self.span, "use a single `|` to specify multiple patterns", "|".to_owned());
+                err.emit();
                 self.bump();
             } else if self.check(&token::BinOp(token::Or)) {
                 self.bump();