X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc%2Fmiddle%2Fexported_symbols.rs;h=9e7af280408bd0bba77ef8306693e1a0f5911d62;hb=fff08cb04389497d254fb40948674cbbee402908;hp=4eb3a2bd10b44b73e6b5e00d28bb884033380c17;hpb=67b7f5779da3506c69ab4f913563a4ac4fae5ecb;p=rust.git diff --git a/src/librustc/middle/exported_symbols.rs b/src/librustc/middle/exported_symbols.rs index 4eb3a2bd10b..9e7af280408 100644 --- a/src/librustc/middle/exported_symbols.rs +++ b/src/librustc/middle/exported_symbols.rs @@ -38,9 +38,7 @@ pub enum ExportedSymbol<'tcx> { } impl<'tcx> ExportedSymbol<'tcx> { - pub fn symbol_name(&self, - tcx: TyCtxt<'_, 'tcx, '_>) - -> ty::SymbolName { + pub fn symbol_name(&self, tcx: TyCtxt<'tcx, '_>) -> ty::SymbolName { match *self { ExportedSymbol::NonGeneric(def_id) => { tcx.symbol_name(ty::Instance::mono(tcx, def_id)) @@ -54,10 +52,11 @@ pub fn symbol_name(&self, } } - pub fn compare_stable(&self, - tcx: TyCtxt<'_, 'tcx, '_>, - other: &ExportedSymbol<'tcx>) - -> cmp::Ordering { + pub fn compare_stable( + &self, + tcx: TyCtxt<'tcx, '_>, + other: &ExportedSymbol<'tcx>, + ) -> cmp::Ordering { match *self { ExportedSymbol::NonGeneric(self_def_id) => match *other { ExportedSymbol::NonGeneric(other_def_id) => { @@ -92,7 +91,7 @@ pub fn compare_stable(&self, } } -pub fn metadata_symbol_name(tcx: TyCtxt<'_, '_, '_>) -> String { +pub fn metadata_symbol_name(tcx: TyCtxt<'_, '_>) -> String { format!("rust_metadata_{}_{}", tcx.original_crate_name(LOCAL_CRATE), tcx.crate_disambiguator(LOCAL_CRATE).to_fingerprint().to_hex())