about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2021-07-06 18:56:01 +0200
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2023-05-11 14:35:09 +0000
commita1d0a902c3aa792bf3eb34d90fd9289b55d29965 (patch)
tree239b767d66d27ac8d04ced5b756f8e8fc0570fc7
parent59305092727515852a394ab2d8c66fe107dc3a21 (diff)
downloadrust-a1d0a902c3aa792bf3eb34d90fd9289b55d29965.tar.gz
rust-a1d0a902c3aa792bf3eb34d90fd9289b55d29965.zip
Use global_fn_name instead of format!
-rw-r--r--src/allocator.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/allocator.rs b/src/allocator.rs
index 3b74050250b..c27971897a0 100644
--- a/src/allocator.rs
+++ b/src/allocator.rs
@@ -4,7 +4,8 @@
 use crate::prelude::*;
 
 use rustc_ast::expand::allocator::{
-    alloc_error_handler_name, default_fn_name, AllocatorKind, AllocatorTy, ALLOCATOR_METHODS,
+    alloc_error_handler_name, default_fn_name, global_fn_name, AllocatorKind, AllocatorTy,
+    ALLOCATOR_METHODS,
 };
 use rustc_codegen_ssa::base::allocator_kind_for_codegen;
 use rustc_session::config::OomStrategy;
@@ -68,7 +69,7 @@ fn codegen_inner(
                 module,
                 unwind_context,
                 sig,
-                &format!("__rust_{}", method.name),
+                &global_fn_name(method.name),
                 &default_fn_name(method.name),
             );
         }