@@ -29,7 +29,7 @@ use rustc_serialize::{Decodable, Decoder, SpecializedDecoder, opaque};
2929use syntax:: attr;
3030use syntax:: ast:: { self , Ident } ;
3131use syntax:: source_map;
32- use syntax:: symbol:: { InternedString , sym} ;
32+ use syntax:: symbol:: { Symbol , sym} ;
3333use syntax:: ext:: base:: { MacroKind , SyntaxExtension } ;
3434use syntax:: ext:: hygiene:: Mark ;
3535use syntax_pos:: { self , Span , BytePos , Pos , DUMMY_SP , NO_EXPANSION } ;
@@ -497,12 +497,13 @@ impl<'a, 'tcx> CrateMetadata {
497497 }
498498 }
499499
500- pub fn item_name ( & self , item_index : DefIndex ) -> InternedString {
500+ pub fn item_name ( & self , item_index : DefIndex ) -> Symbol {
501501 self . def_key ( item_index)
502502 . disambiguated_data
503503 . data
504504 . get_opt_name ( )
505505 . expect ( "no name in item_name" )
506+ . as_symbol ( )
506507 }
507508
508509 pub fn def_kind ( & self , index : DefIndex ) -> Option < DefKind > {
@@ -568,15 +569,15 @@ impl<'a, 'tcx> CrateMetadata {
568569
569570 ty:: VariantDef :: new (
570571 tcx,
571- Ident :: from_interned_str ( self . item_name ( index) ) ,
572+ Ident :: with_empty_ctxt ( self . item_name ( index) ) ,
572573 variant_did,
573574 ctor_did,
574575 data. discr ,
575576 item. children . decode ( self ) . map ( |index| {
576577 let f = self . entry ( index) ;
577578 ty:: FieldDef {
578579 did : self . local_def_id ( index) ,
579- ident : Ident :: from_interned_str ( self . item_name ( index) ) ,
580+ ident : Ident :: with_empty_ctxt ( self . item_name ( index) ) ,
580581 vis : f. visibility . decode ( self )
581582 }
582583 } ) . collect ( ) ,
@@ -787,7 +788,7 @@ impl<'a, 'tcx> CrateMetadata {
787788 if let Some ( kind) = self . def_kind ( child_index) {
788789 callback ( def:: Export {
789790 res : Res :: Def ( kind, self . local_def_id ( child_index) ) ,
790- ident : Ident :: from_interned_str ( self . item_name ( child_index) ) ,
791+ ident : Ident :: with_empty_ctxt ( self . item_name ( child_index) ) ,
791792 vis : self . get_visibility ( child_index) ,
792793 span : self . entry ( child_index) . span . decode ( ( self , sess) ) ,
793794 } ) ;
@@ -982,7 +983,7 @@ impl<'a, 'tcx> CrateMetadata {
982983 self . entry ( id)
983984 . children
984985 . decode ( self )
985- . map ( |index| self . item_name ( index) . as_symbol ( ) )
986+ . map ( |index| self . item_name ( index) )
986987 . collect ( )
987988 }
988989
0 commit comments