1
1
use crate :: hir:: def_id:: { DefId , CrateNum , LOCAL_CRATE } ;
2
2
use crate :: hir:: HirId ;
3
- use syntax:: symbol:: { InternedString , Symbol } ;
3
+ use syntax:: symbol:: Symbol ;
4
4
use syntax:: attr:: InlineAttr ;
5
5
use syntax:: source_map:: Span ;
6
6
use crate :: ty:: { Instance , InstanceDef , TyCtxt , SymbolName , subst:: InternalSubsts } ;
@@ -246,7 +246,7 @@ pub struct CodegenUnit<'tcx> {
246
246
/// name be unique amongst **all** crates. Therefore, it should
247
247
/// contain something unique to this crate (e.g., a module path)
248
248
/// as well as the crate name and disambiguator.
249
- name : InternedString ,
249
+ name : Symbol ,
250
250
items : FxHashMap < MonoItem < ' tcx > , ( Linkage , Visibility ) > ,
251
251
size_estimate : Option < usize > ,
252
252
}
@@ -294,19 +294,19 @@ impl_stable_hash_for!(enum self::Visibility {
294
294
} ) ;
295
295
296
296
impl < ' tcx > CodegenUnit < ' tcx > {
297
- pub fn new ( name : InternedString ) -> CodegenUnit < ' tcx > {
297
+ pub fn new ( name : Symbol ) -> CodegenUnit < ' tcx > {
298
298
CodegenUnit {
299
299
name : name,
300
300
items : Default :: default ( ) ,
301
301
size_estimate : None ,
302
302
}
303
303
}
304
304
305
- pub fn name ( & self ) -> & InternedString {
306
- & self . name
305
+ pub fn name ( & self ) -> Symbol {
306
+ self . name
307
307
}
308
308
309
- pub fn set_name ( & mut self , name : InternedString ) {
309
+ pub fn set_name ( & mut self , name : Symbol ) {
310
310
self . name = name;
311
311
}
312
312
@@ -474,7 +474,7 @@ impl CodegenUnitNameBuilder<'tcx> {
474
474
cnum : CrateNum ,
475
475
components : I ,
476
476
special_suffix : Option < S > )
477
- -> InternedString
477
+ -> Symbol
478
478
where I : IntoIterator < Item =C > ,
479
479
C : fmt:: Display ,
480
480
S : fmt:: Display ,
@@ -487,7 +487,7 @@ impl CodegenUnitNameBuilder<'tcx> {
487
487
cgu_name
488
488
} else {
489
489
let cgu_name = & cgu_name. as_str ( ) [ ..] ;
490
- InternedString :: intern ( & CodegenUnit :: mangle_name ( cgu_name) )
490
+ Symbol :: intern ( & CodegenUnit :: mangle_name ( cgu_name) )
491
491
}
492
492
}
493
493
@@ -497,7 +497,7 @@ impl CodegenUnitNameBuilder<'tcx> {
497
497
cnum : CrateNum ,
498
498
components : I ,
499
499
special_suffix : Option < S > )
500
- -> InternedString
500
+ -> Symbol
501
501
where I : IntoIterator < Item =C > ,
502
502
C : fmt:: Display ,
503
503
S : fmt:: Display ,
@@ -543,6 +543,6 @@ impl CodegenUnitNameBuilder<'tcx> {
543
543
write ! ( cgu_name, ".{}" , special_suffix) . unwrap ( ) ;
544
544
}
545
545
546
- InternedString :: intern ( & cgu_name[ ..] )
546
+ Symbol :: intern ( & cgu_name[ ..] )
547
547
}
548
548
}
0 commit comments