Rollup merge of #63938 - tshepang:typo, r=Centril

or-pattern: fix typo in error message

cc https://github.com/rust-lang/rust/issues/54883.
This commit is contained in:
Mazdak Farrokhzad 2019-08-29 05:32:46 +02:00 committed by GitHub
commit eb4ac32c59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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)?;

View File

@ -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
}
}

View File

@ -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