Skip to content

Commit

Permalink
or-pattern: fix typo in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
tshepang committed Aug 28, 2019
1 parent 53df91a commit 6f67bbc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/libsyntax/parse/parser/pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl<'a> Parser<'a> {
let mut pats = vec![first_pat];
while self.eat_or_separator() {
let pat = self.parse_pat(expected).map_err(|mut err| {
err.span_label(lo, "while parsing this or-pattern staring here");
err.span_label(lo, "while parsing this or-pattern starting here");
err
})?;
self.maybe_recover_unexpected_comma(pat.span, rc)?;
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/or-patterns/while-parsing-this-or-pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
fn main() {
match Some(42) {
Some(42) | .=. => {} //~ ERROR expected pattern, found `.`
//~^ while parsing this or-pattern staring here
//~^ while parsing this or-pattern starting here
//~| NOTE expected pattern
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error: expected pattern, found `.`
LL | Some(42) | .=. => {}
| -------- ^ expected pattern
| |
| while parsing this or-pattern staring here
| while parsing this or-pattern starting here

error: aborting due to previous error

0 comments on commit 6f67bbc

Please sign in to comment.