11use crate :: hir:: def_id:: { DefId , CrateNum , LOCAL_CRATE } ;
22use crate :: hir:: HirId ;
3- use syntax:: symbol:: { InternedString , Symbol } ;
3+ use syntax:: symbol:: Symbol ;
44use syntax:: attr:: InlineAttr ;
55use syntax:: source_map:: Span ;
66use crate :: ty:: { Instance , InstanceDef , TyCtxt , SymbolName , subst:: InternalSubsts } ;
@@ -246,7 +246,7 @@ pub struct CodegenUnit<'tcx> {
246246 /// name be unique amongst **all** crates. Therefore, it should
247247 /// contain something unique to this crate (e.g., a module path)
248248 /// as well as the crate name and disambiguator.
249- name : InternedString ,
249+ name : Symbol ,
250250 items : FxHashMap < MonoItem < ' tcx > , ( Linkage , Visibility ) > ,
251251 size_estimate : Option < usize > ,
252252}
@@ -294,19 +294,19 @@ impl_stable_hash_for!(enum self::Visibility {
294294} ) ;
295295
296296impl < ' tcx > CodegenUnit < ' tcx > {
297- pub fn new ( name : InternedString ) -> CodegenUnit < ' tcx > {
297+ pub fn new ( name : Symbol ) -> CodegenUnit < ' tcx > {
298298 CodegenUnit {
299299 name : name,
300300 items : Default :: default ( ) ,
301301 size_estimate : None ,
302302 }
303303 }
304304
305- pub fn name ( & self ) -> & InternedString {
306- & self . name
305+ pub fn name ( & self ) -> Symbol {
306+ self . name
307307 }
308308
309- pub fn set_name ( & mut self , name : InternedString ) {
309+ pub fn set_name ( & mut self , name : Symbol ) {
310310 self . name = name;
311311 }
312312
@@ -474,7 +474,7 @@ impl CodegenUnitNameBuilder<'tcx> {
474474 cnum : CrateNum ,
475475 components : I ,
476476 special_suffix : Option < S > )
477- -> InternedString
477+ -> Symbol
478478 where I : IntoIterator < Item =C > ,
479479 C : fmt:: Display ,
480480 S : fmt:: Display ,
@@ -487,7 +487,7 @@ impl CodegenUnitNameBuilder<'tcx> {
487487 cgu_name
488488 } else {
489489 let cgu_name = & cgu_name. as_str ( ) [ ..] ;
490- InternedString :: intern ( & CodegenUnit :: mangle_name ( cgu_name) )
490+ Symbol :: intern ( & CodegenUnit :: mangle_name ( cgu_name) )
491491 }
492492 }
493493
@@ -497,7 +497,7 @@ impl CodegenUnitNameBuilder<'tcx> {
497497 cnum : CrateNum ,
498498 components : I ,
499499 special_suffix : Option < S > )
500- -> InternedString
500+ -> Symbol
501501 where I : IntoIterator < Item =C > ,
502502 C : fmt:: Display ,
503503 S : fmt:: Display ,
@@ -543,6 +543,6 @@ impl CodegenUnitNameBuilder<'tcx> {
543543 write ! ( cgu_name, ".{}" , special_suffix) . unwrap ( ) ;
544544 }
545545
546- InternedString :: intern ( & cgu_name[ ..] )
546+ Symbol :: intern ( & cgu_name[ ..] )
547547 }
548548}
0 commit comments