parser: let
stmts & for
exprs: allow or-patterns.
This commit is contained in:
parent
92d66a1317
commit
95792b4d5a
24 changed files with 35 additions and 40 deletions
|
@ -45,12 +45,6 @@ impl<'a> Parser<'a> {
|
|||
self.parse_pat_with_or(None, gate_or, true)
|
||||
}
|
||||
|
||||
pub(super) fn parse_top_level_pat(&mut self) -> PResult<'a, P<Pat>> {
|
||||
let pat = self.parse_pat(None)?;
|
||||
self.maybe_recover_unexpected_comma(pat.span, true)?;
|
||||
Ok(pat)
|
||||
}
|
||||
|
||||
/// Parses a pattern, that may be a or-pattern (e.g. `Foo | Bar` in `Some(Foo | Bar)`).
|
||||
/// Corresponds to `pat<allow_top_alt>` in RFC 2535.
|
||||
fn parse_pat_with_or(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue