@@ -12,6 +12,7 @@ pub use self::code_stats::{CodeStats, DataTypeKind, FieldInfo};
1212pub use self :: code_stats:: { SizeKind , TypeSizeInfo , VariantInfo } ;
1313
1414use hir:: def_id:: { CrateNum , DefIndex } ;
15+ use ich:: Fingerprint ;
1516
1617use lint;
1718use middle:: allocator:: AllocatorKind ;
@@ -29,7 +30,6 @@ use syntax::json::JsonEmitter;
2930use syntax:: feature_gate;
3031use syntax:: parse;
3132use syntax:: parse:: ParseSess ;
32- use syntax:: symbol:: Symbol ;
3333use syntax:: { ast, codemap} ;
3434use syntax:: feature_gate:: AttributeType ;
3535use syntax_pos:: { Span , MultiSpan } ;
@@ -88,7 +88,7 @@ pub struct Session {
8888 /// forms a unique global identifier for the crate. It is used to allow
8989 /// multiple crates with the same name to coexist. See the
9090 /// trans::back::symbol_names module for more information.
91- pub crate_disambiguator : RefCell < Option < Symbol > > ,
91+ pub crate_disambiguator : RefCell < Option < Fingerprint > > ,
9292 pub features : RefCell < feature_gate:: Features > ,
9393
9494 /// The maximum recursion limit for potentially infinitely recursive
@@ -165,7 +165,7 @@ enum DiagnosticBuilderMethod {
165165}
166166
167167impl Session {
168- pub fn local_crate_disambiguator ( & self ) -> Symbol {
168+ pub fn local_crate_disambiguator ( & self ) -> Fingerprint {
169169 match * self . crate_disambiguator . borrow ( ) {
170170 Some ( sym) => sym,
171171 None => bug ! ( "accessing disambiguator before initialization" ) ,
@@ -471,14 +471,17 @@ impl Session {
471471
472472 /// Returns the symbol name for the registrar function,
473473 /// given the crate Svh and the function DefIndex.
474- pub fn generate_plugin_registrar_symbol ( & self , disambiguator : Symbol , index : DefIndex )
474+ pub fn generate_plugin_registrar_symbol ( & self , disambiguator : Fingerprint ,
475+ index : DefIndex )
475476 -> String {
476- format ! ( "__rustc_plugin_registrar__{}_{}" , disambiguator, index. as_usize( ) )
477+ format ! ( "__rustc_plugin_registrar__{}_{}" , disambiguator. to_hex( ) ,
478+ index. as_usize( ) )
477479 }
478480
479- pub fn generate_derive_registrar_symbol ( & self , disambiguator : Symbol , index : DefIndex )
481+ pub fn generate_derive_registrar_symbol ( & self , disambiguator : Fingerprint , index : DefIndex )
480482 -> String {
481- format ! ( "__rustc_derive_registrar__{}_{}" , disambiguator, index. as_usize( ) )
483+ format ! ( "__rustc_derive_registrar__{}_{}" , disambiguator. to_hex( ) ,
484+ index. as_usize( ) )
482485 }
483486
484487 pub fn sysroot < ' a > ( & ' a self ) -> & ' a Path {
0 commit comments