99// except according to those terms.
1010use self :: LockstepIterSize :: * ;
1111
12- use ast:: { Ident , Name } ;
12+ use ast:: Ident ;
1313use syntax_pos:: { Span , DUMMY_SP } ;
1414use errors:: { Handler , DiagnosticBuilder } ;
1515use ext:: tt:: macro_parser:: { NamedMatch , MatchedSeq , MatchedNonterminal } ;
@@ -38,7 +38,7 @@ pub struct TtReader<'a> {
3838 /// the unzipped tree:
3939 stack : Vec < TtFrame > ,
4040 /* for MBE-style macro transcription */
41- interpolations : HashMap < Name , Rc < NamedMatch > > ,
41+ interpolations : HashMap < Ident , Rc < NamedMatch > > ,
4242 imported_from : Option < Ident > ,
4343
4444 // Some => return imported_from as the next token
@@ -57,7 +57,7 @@ pub struct TtReader<'a> {
5757/// `src` contains no `TokenTree::Sequence`s, `MatchNt`s or `SubstNt`s, `interp` can
5858/// (and should) be None.
5959pub fn new_tt_reader ( sp_diag : & Handler ,
60- interp : Option < HashMap < Name , Rc < NamedMatch > > > ,
60+ interp : Option < HashMap < Ident , Rc < NamedMatch > > > ,
6161 imported_from : Option < Ident > ,
6262 src : Vec < tokenstream:: TokenTree > )
6363 -> TtReader {
@@ -71,7 +71,7 @@ pub fn new_tt_reader(sp_diag: &Handler,
7171/// `src` contains no `TokenTree::Sequence`s, `MatchNt`s or `SubstNt`s, `interp` can
7272/// (and should) be None.
7373pub fn new_tt_reader_with_doc_flag ( sp_diag : & Handler ,
74- interp : Option < HashMap < Name , Rc < NamedMatch > > > ,
74+ interp : Option < HashMap < Ident , Rc < NamedMatch > > > ,
7575 imported_from : Option < Ident > ,
7676 src : Vec < tokenstream:: TokenTree > ,
7777 desugar_doc_comments : bool )
@@ -119,7 +119,7 @@ fn lookup_cur_matched_by_matched(r: &TtReader, start: Rc<NamedMatch>) -> Rc<Name
119119}
120120
121121fn lookup_cur_matched ( r : & TtReader , name : Ident ) -> Option < Rc < NamedMatch > > {
122- let matched_opt = r. interpolations . get ( & name. name ) . cloned ( ) ;
122+ let matched_opt = r. interpolations . get ( & name) . cloned ( ) ;
123123 matched_opt. map ( |s| lookup_cur_matched_by_matched ( r, s) )
124124}
125125
0 commit comments