From 32fd1a7b7205d1f8ccf168c22dada83ea38e3adb Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Tue, 11 Feb 2025 19:40:29 -0800 Subject: compiler: replace ExternAbi::name calls with formatters Most of these just format the ABI string, so... just format ExternAbi? This makes it more consistent and less jank when we can do it. --- compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'compiler/rustc_codegen_ssa/src/debuginfo') diff --git a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs index 05175371591..53953b089c6 100644 --- a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs +++ b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs @@ -367,9 +367,7 @@ fn push_debuginfo_type_name<'tcx>( output.push_str(sig.safety.prefix_str()); if sig.abi != rustc_abi::ExternAbi::Rust { - output.push_str("extern \""); - output.push_str(sig.abi.name()); - output.push_str("\" "); + let _ = write!(output, "extern {} ", sig.abi); } output.push_str("fn("); -- cgit 1.4.1-3-g733a5