Use global_fn_name instead of format!

This commit is contained in:
bjorn3 2021-07-06 18:56:01 +02:00 committed by bjorn3
parent 5930509272
commit a1d0a902c3

View File

@ -4,7 +4,8 @@
use crate::prelude::*; use crate::prelude::*;
use rustc_ast::expand::allocator::{ 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_codegen_ssa::base::allocator_kind_for_codegen;
use rustc_session::config::OomStrategy; use rustc_session::config::OomStrategy;
@ -68,7 +69,7 @@ fn codegen_inner(
module, module,
unwind_context, unwind_context,
sig, sig,
&format!("__rust_{}", method.name), &global_fn_name(method.name),
&default_fn_name(method.name), &default_fn_name(method.name),
); );
} }