diff options
| author | Aleksey Kladov <aleksey.kladov@gmail.com> | 2020-07-27 14:04:54 +0200 |
|---|---|---|
| committer | Aleksey Kladov <aleksey.kladov@gmail.com> | 2020-08-02 14:09:25 +0200 |
| commit | 2595d75ea98e6bede1a6c847fe22c8abe3a9401e (patch) | |
| tree | f57df0b05414a96442dc90894acb44993a629027 /src/librustc_parse/parser/expr.rs | |
| parent | dfe1e3b641abbede6230e3931d14f0d43e5b8e54 (diff) | |
| download | rust-2595d75ea98e6bede1a6c847fe22c8abe3a9401e.tar.gz rust-2595d75ea98e6bede1a6c847fe22c8abe3a9401e.zip | |
Introduce NonterminalKind
It encapsulate the (part of) the interface between the parser and macro by example (macro_rules) parser. The second bit is somewhat more general `parse_ast_fragment`, which is the reason why we keep some `parse_xxx` functions as public.
Diffstat (limited to 'src/librustc_parse/parser/expr.rs')
| -rw-r--r-- | src/librustc_parse/parser/expr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_parse/parser/expr.rs b/src/librustc_parse/parser/expr.rs index d06b172bc14..3aec300d86d 100644 --- a/src/librustc_parse/parser/expr.rs +++ b/src/librustc_parse/parser/expr.rs @@ -1450,7 +1450,7 @@ impl<'a> Parser<'a> { /// Matches `'-' lit | lit` (cf. `ast_validation::AstValidator::check_expr_within_pat`). /// Keep this in sync with `Token::can_begin_literal_maybe_minus`. - pub fn parse_literal_maybe_minus(&mut self) -> PResult<'a, P<Expr>> { + pub(super) fn parse_literal_maybe_minus(&mut self) -> PResult<'a, P<Expr>> { maybe_whole_expr!(self); let lo = self.token.span; |
