Skip to content

Commit 6fa69a0

Browse files
authored
Fix fmt
1 parent d56dbbe commit 6fa69a0

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

compiler/rustc_codegen_ssa/src/back/linker.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1699,7 +1699,9 @@ fn exported_symbols_for_non_proc_macro(tcx: TyCtxt<'_>, crate_type: CrateType) -
16991699
let export_threshold = symbol_export::crates_export_threshold(&[crate_type]);
17001700
for_each_exported_symbols_include_dep(tcx, crate_type, |symbol, info, cnum| {
17011701
if info.level.is_below_threshold(export_threshold) {
1702-
symbols.push(symbol_export::exporting_symbol_name_for_instance_in_crate(tcx, symbol, cnum));
1702+
symbols.push(symbol_export::exporting_symbol_name_for_instance_in_crate(
1703+
tcx, symbol, cnum
1704+
));
17031705
}
17041706
});
17051707

compiler/rustc_codegen_ssa/src/back/symbol_export.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,6 @@ pub fn linking_symbol_name_for_instance_in_crate<'tcx>(
608608
format!("{prefix}{undecorated}{suffix}{args_in_bytes}")
609609
}
610610

611-
612611
pub fn exporting_symbol_name_for_instance_in_crate<'tcx>(
613612
tcx: TyCtxt<'tcx>,
614613
symbol: ExportedSymbol<'tcx>,
@@ -618,14 +617,14 @@ pub fn exporting_symbol_name_for_instance_in_crate<'tcx>(
618617

619618
if tcx.sess.target.force_emulated_tls
620619
&& let ExportedSymbol::NonGeneric(def_id) = symbol
621-
&& tcx.is_thread_local_static(def_id)
622-
{
620+
&& tcx.is_thread_local_static(def_id)
621+
{
623622
// When using emutls, LLVM will add the `__emutls_v.` prefix to thread local symbols,
624623
// and exported symbol name need to match this.
625-
format!("__emutls_v.{undecorated}")
626-
} else {
624+
format!("__emutls_v.{undecorated}")
625+
} else {
627626
undecorated
628-
}
627+
}
629628
}
630629

631630
fn wasm_import_module_map(tcx: TyCtxt<'_>, cnum: CrateNum) -> FxHashMap<DefId, String> {

0 commit comments

Comments
 (0)