diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-06-07 20:14:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-07 20:14:30 +0200 |
| commit | 4aceaaa7f33fe0c4ad8d0b04e8c9bc8d0e76c962 (patch) | |
| tree | d878466ed34d0d6070c6265fdd663cc8bc7f563c /compiler/rustc_parse/src/parser/expr.rs | |
| parent | bc793291b59b4b951c7353493bd8bffb2cd88457 (diff) | |
| parent | 4c731c2f6b5d1305515c7c6820f0da731c7af4c3 (diff) | |
| download | rust-4aceaaa7f33fe0c4ad8d0b04e8c9bc8d0e76c962.tar.gz rust-4aceaaa7f33fe0c4ad8d0b04e8c9bc8d0e76c962.zip | |
Rollup merge of #126052 - nnethercote:rustc_parse-more-cleanups, r=spastorino
More `rustc_parse` cleanups Following on from #125815. r? `@spastorino`
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 285bac3f4b8..e15d6ab2123 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -431,7 +431,7 @@ impl<'a> Parser<'a> { /// The method does not advance the current token. /// /// Also performs recovery for `and` / `or` which are mistaken for `&&` and `||` respectively. - pub fn check_assoc_op(&self) -> Option<Spanned<AssocOp>> { + pub(super) fn check_assoc_op(&self) -> Option<Spanned<AssocOp>> { let (op, span) = match (AssocOp::from_token(&self.token), self.token.ident()) { // When parsing const expressions, stop parsing when encountering `>`. ( @@ -1006,7 +1006,11 @@ impl<'a> Parser<'a> { } } - pub fn parse_dot_suffix_expr(&mut self, lo: Span, base: P<Expr>) -> PResult<'a, P<Expr>> { + pub(super) fn parse_dot_suffix_expr( + &mut self, + lo: Span, + base: P<Expr>, + ) -> PResult<'a, P<Expr>> { // At this point we've consumed something like `expr.` and `self.token` holds the token // after the dot. match self.token.uninterpolate().kind { |
