@@ -8,7 +8,7 @@ use rustc_span::symbol::{kw, Ident};
88
99use crate :: errors:: UnexpectedNonterminal ;
1010use crate :: parser:: pat:: { CommaRecoveryMode , RecoverColon , RecoverComma } ;
11- use crate :: parser:: { FollowedByType , ForceCollect , NtOrTt , Parser , PathStyle } ;
11+ use crate :: parser:: { FollowedByType , ForceCollect , ParseNtResult , Parser , PathStyle } ;
1212
1313impl < ' a > Parser < ' a > {
1414 /// Checks whether a non-terminal may begin with a particular token.
@@ -103,14 +103,14 @@ impl<'a> Parser<'a> {
103103 /// Parse a non-terminal (e.g. MBE `:pat` or `:ident`). Inlined because there is only one call
104104 /// site.
105105 #[ 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 > {
107107 // A `macro_rules!` invocation may pass a captured item/expr to a proc-macro,
108108 // which requires having captured tokens available. Since we cannot determine
109109 // in advance whether or not a proc-macro will be (transitively) invoked,
110110 // we always capture tokens for any `Nonterminal` which needs them.
111111 let mut nt = match kind {
112112 // 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 ( ) ) ) ,
114114 NonterminalKind :: Item => match self . parse_item ( ForceCollect :: Yes ) ? {
115115 Some ( item) => NtItem ( item) ,
116116 None => {
@@ -197,7 +197,7 @@ impl<'a> Parser<'a> {
197197 ) ;
198198 }
199199
200- Ok ( NtOrTt :: Nt ( nt) )
200+ Ok ( ParseNtResult :: Nt ( nt) )
201201 }
202202}
203203
0 commit comments