Box ExprKind::{Closure,MethodCall}
, and QSelf
in expressions, types, and patterns.
This commit is contained in:
parent
bebd57a960
commit
6b7ca2fcf2
37 changed files with 409 additions and 318 deletions
|
@ -889,7 +889,7 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
|
||||
/// Parse a struct ("record") pattern (e.g. `Foo { ... }` or `Foo::Bar { ... }`).
|
||||
fn parse_pat_struct(&mut self, qself: Option<QSelf>, path: Path) -> PResult<'a, PatKind> {
|
||||
fn parse_pat_struct(&mut self, qself: Option<P<QSelf>>, path: Path) -> PResult<'a, PatKind> {
|
||||
if qself.is_some() {
|
||||
// Feature gate the use of qualified paths in patterns
|
||||
self.sess.gated_spans.gate(sym::more_qualified_paths, path.span);
|
||||
|
@ -906,7 +906,11 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
|
||||
/// Parse tuple struct or tuple variant pattern (e.g. `Foo(...)` or `Foo::Bar(...)`).
|
||||
fn parse_pat_tuple_struct(&mut self, qself: Option<QSelf>, path: Path) -> PResult<'a, PatKind> {
|
||||
fn parse_pat_tuple_struct(
|
||||
&mut self,
|
||||
qself: Option<P<QSelf>>,
|
||||
path: Path,
|
||||
) -> PResult<'a, PatKind> {
|
||||
let (fields, _) = self.parse_paren_comma_seq(|p| {
|
||||
p.parse_pat_allow_top_alt(
|
||||
None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue