diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-06-03 15:47:46 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-06-06 08:26:54 +1000 |
| commit | 95b4c07ef897974a8978b4a43d0d98103a824f58 (patch) | |
| tree | 24eb3fdb92c908d68ec14619e958be18b7dc9e6c /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 7ebd2bdbf6d798e6e711a0100981b0ff029abf5f (diff) | |
| download | rust-95b4c07ef897974a8978b4a43d0d98103a824f58.tar.gz rust-95b4c07ef897974a8978b4a43d0d98103a824f58.zip | |
Reduce `pub` exposure.
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 1b99bc015b6..5a39248e49a 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -445,7 +445,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 `>`. ( @@ -1022,7 +1022,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 { |
