diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-09-08 10:52:51 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-11-17 13:45:59 +1100 |
| commit | 6b7ca2fcf2ebbba705f7a98c00bd56b5348ee9d7 (patch) | |
| tree | 36212a72da44e033e4bae2d42d087abcf488748f /compiler/rustc_parse/src/parser/path.rs | |
| parent | bebd57a9602e48431c90274fbf7d96683b0708b6 (diff) | |
| download | rust-6b7ca2fcf2ebbba705f7a98c00bd56b5348ee9d7.tar.gz rust-6b7ca2fcf2ebbba705f7a98c00bd56b5348ee9d7.zip | |
Box `ExprKind::{Closure,MethodCall}`, and `QSelf` in expressions, types, and patterns.
Diffstat (limited to 'compiler/rustc_parse/src/parser/path.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/path.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index d46565dea89..c2d4d218a5b 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -48,7 +48,7 @@ impl<'a> Parser<'a> { /// `<T as U>::a` /// `<T as U>::F::a<S>` (without disambiguator) /// `<T as U>::F::a::<S>` (with disambiguator) - pub(super) fn parse_qpath(&mut self, style: PathStyle) -> PResult<'a, (QSelf, Path)> { + pub(super) fn parse_qpath(&mut self, style: PathStyle) -> PResult<'a, (P<QSelf>, Path)> { let lo = self.prev_token.span; let ty = self.parse_ty()?; @@ -77,7 +77,7 @@ impl<'a> Parser<'a> { self.expect(&token::ModSep)?; } - let qself = QSelf { ty, path_span, position: path.segments.len() }; + let qself = P(QSelf { ty, path_span, position: path.segments.len() }); self.parse_path_segments(&mut path.segments, style, None)?; Ok(( |
