Rollup merge of #133424 - Nadrieril:guard-patterns-parsing, r=fee1-dead
Parse guard patterns This implements the parsing of [RFC3637 Guard Patterns](https://rust-lang.github.io/rfcs/3637-guard-patterns.html) (see also [tracking issue](https://github.com/rust-lang/rust/issues/129967)). This PR is extracted from https://github.com/rust-lang/rust/pull/129996 with minor modifications. cc `@max-niederman`
This commit is contained in:
commit
1868c8f66f
31 changed files with 328 additions and 81 deletions
|
@ -990,7 +990,7 @@ pub fn parse_ast_fragment<'a>(
|
|||
}
|
||||
}
|
||||
AstFragmentKind::Ty => AstFragment::Ty(this.parse_ty()?),
|
||||
AstFragmentKind::Pat => AstFragment::Pat(this.parse_pat_allow_top_alt(
|
||||
AstFragmentKind::Pat => AstFragment::Pat(this.parse_pat_allow_top_guard(
|
||||
None,
|
||||
RecoverComma::No,
|
||||
RecoverColon::Yes,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue