9
9
// except according to those terms.
10
10
use self :: LockstepIterSize :: * ;
11
11
12
- use ast:: { Ident , Name } ;
12
+ use ast:: Ident ;
13
13
use syntax_pos:: { Span , DUMMY_SP } ;
14
14
use errors:: { Handler , DiagnosticBuilder } ;
15
15
use ext:: tt:: macro_parser:: { NamedMatch , MatchedSeq , MatchedNonterminal } ;
@@ -38,7 +38,7 @@ pub struct TtReader<'a> {
38
38
/// the unzipped tree:
39
39
stack : Vec < TtFrame > ,
40
40
/* for MBE-style macro transcription */
41
- interpolations : HashMap < Name , Rc < NamedMatch > > ,
41
+ interpolations : HashMap < Ident , Rc < NamedMatch > > ,
42
42
imported_from : Option < Ident > ,
43
43
44
44
// Some => return imported_from as the next token
@@ -57,7 +57,7 @@ pub struct TtReader<'a> {
57
57
/// `src` contains no `TokenTree::Sequence`s, `MatchNt`s or `SubstNt`s, `interp` can
58
58
/// (and should) be None.
59
59
pub fn new_tt_reader ( sp_diag : & Handler ,
60
- interp : Option < HashMap < Name , Rc < NamedMatch > > > ,
60
+ interp : Option < HashMap < Ident , Rc < NamedMatch > > > ,
61
61
imported_from : Option < Ident > ,
62
62
src : Vec < tokenstream:: TokenTree > )
63
63
-> TtReader {
@@ -71,7 +71,7 @@ pub fn new_tt_reader(sp_diag: &Handler,
71
71
/// `src` contains no `TokenTree::Sequence`s, `MatchNt`s or `SubstNt`s, `interp` can
72
72
/// (and should) be None.
73
73
pub fn new_tt_reader_with_doc_flag ( sp_diag : & Handler ,
74
- interp : Option < HashMap < Name , Rc < NamedMatch > > > ,
74
+ interp : Option < HashMap < Ident , Rc < NamedMatch > > > ,
75
75
imported_from : Option < Ident > ,
76
76
src : Vec < tokenstream:: TokenTree > ,
77
77
desugar_doc_comments : bool )
@@ -119,7 +119,7 @@ fn lookup_cur_matched_by_matched(r: &TtReader, start: Rc<NamedMatch>) -> Rc<Name
119
119
}
120
120
121
121
fn 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 ( ) ;
123
123
matched_opt. map ( |s| lookup_cur_matched_by_matched ( r, s) )
124
124
}
125
125
0 commit comments