diff options
| author | bors <bors@rust-lang.org> | 2025-02-12 12:42:25 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-02-12 12:42:25 +0000 |
| commit | 552a959051cebf8f88a8f558399baf733bec9ce0 (patch) | |
| tree | 48304854568ebfb0dbbd1f5fea651b0337eb67a4 /compiler/rustc_mir_transform/src | |
| parent | 021fb9c09a19d206a37226fe6168f1cc7c984925 (diff) | |
| parent | 40f04999f5e0ad82a588af284bdf63b0454dfeb0 (diff) | |
| download | rust-552a959051cebf8f88a8f558399baf733bec9ce0.tar.gz rust-552a959051cebf8f88a8f558399baf733bec9ce0.zip | |
Auto merge of #136918 - GuillaumeGomez:rollup-f6h21gg, r=GuillaumeGomez
Rollup of 8 pull requests Successful merges: - #134981 ( Explain that in paths generics can't be set on both the enum and the variant) - #136698 (Replace i686-unknown-redox target with i586-unknown-redox) - #136767 (improve host/cross target checking) - #136829 ([rustdoc] Move line numbers into the `<code>` directly) - #136875 (Rustc dev guide subtree update) - #136900 (compiler: replace `ExternAbi::name` calls with formatters) - #136913 (Put kobzol back on review rotation) - #136915 (documentation fix: `f16` and `f128` are not double-precision) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/function_item_references.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_mir_transform/src/function_item_references.rs b/compiler/rustc_mir_transform/src/function_item_references.rs index 7e88925b2e1..73e47bb79f0 100644 --- a/compiler/rustc_mir_transform/src/function_item_references.rs +++ b/compiler/rustc_mir_transform/src/function_item_references.rs @@ -161,12 +161,7 @@ impl<'tcx> FunctionItemRefChecker<'_, 'tcx> { let unsafety = fn_sig.safety().prefix_str(); let abi = match fn_sig.abi() { ExternAbi::Rust => String::from(""), - other_abi => { - let mut s = String::from("extern \""); - s.push_str(other_abi.name()); - s.push_str("\" "); - s - } + other_abi => format!("extern {other_abi} "), }; let ident = self.tcx.item_ident(fn_id); let ty_params = fn_args.types().map(|ty| format!("{ty}")); |
