@@ -8,7 +8,7 @@ use rustc_span::symbol::{kw, Ident};
8
8
9
9
use crate :: errors:: UnexpectedNonterminal ;
10
10
use crate :: parser:: pat:: { CommaRecoveryMode , RecoverColon , RecoverComma } ;
11
- use crate :: parser:: { FollowedByType , ForceCollect , NtOrTt , Parser , PathStyle } ;
11
+ use crate :: parser:: { FollowedByType , ForceCollect , ParseNtResult , Parser , PathStyle } ;
12
12
13
13
impl < ' a > Parser < ' a > {
14
14
/// Checks whether a non-terminal may begin with a particular token.
@@ -103,14 +103,14 @@ impl<'a> Parser<'a> {
103
103
/// Parse a non-terminal (e.g. MBE `:pat` or `:ident`). Inlined because there is only one call
104
104
/// site.
105
105
#[ inline]
106
- pub fn parse_nonterminal ( & mut self , kind : NonterminalKind ) -> PResult < ' a , NtOrTt > {
106
+ pub fn parse_nonterminal ( & mut self , kind : NonterminalKind ) -> PResult < ' a , ParseNtResult > {
107
107
// A `macro_rules!` invocation may pass a captured item/expr to a proc-macro,
108
108
// which requires having captured tokens available. Since we cannot determine
109
109
// in advance whether or not a proc-macro will be (transitively) invoked,
110
110
// we always capture tokens for any `Nonterminal` which needs them.
111
111
let mut nt = match kind {
112
112
// Note that TT is treated differently to all the others.
113
- NonterminalKind :: TT => return Ok ( NtOrTt :: Tt ( self . parse_token_tree ( ) ) ) ,
113
+ NonterminalKind :: TT => return Ok ( ParseNtResult :: Tt ( self . parse_token_tree ( ) ) ) ,
114
114
NonterminalKind :: Item => match self . parse_item ( ForceCollect :: Yes ) ? {
115
115
Some ( item) => NtItem ( item) ,
116
116
None => {
@@ -197,7 +197,7 @@ impl<'a> Parser<'a> {
197
197
) ;
198
198
}
199
199
200
- Ok ( NtOrTt :: Nt ( nt) )
200
+ Ok ( ParseNtResult :: Nt ( nt) )
201
201
}
202
202
}
203
203
0 commit comments