Skip to content

Commit c50427b

Browse files
committed
Split AllocatorKind::fn_name in global_fn_name and default_fn_name
1 parent 35836b3 commit c50427b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/allocator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
use gccjit::FnAttribute;
33
use gccjit::{FunctionType, GlobalKind, ToRValue};
44
use rustc_ast::expand::allocator::{
5-
alloc_error_handler_name, AllocatorKind, AllocatorTy, ALLOCATOR_METHODS,
5+
alloc_error_handler_name, default_fn_name, AllocatorKind, AllocatorTy, ALLOCATOR_METHODS,
66
};
77
use rustc_middle::bug;
88
use rustc_middle::ty::TyCtxt;
@@ -61,7 +61,7 @@ pub(crate) unsafe fn codegen(tcx: TyCtxt<'_>, mods: &mut GccContext, _module_nam
6161
// TODO(antoyo): emit unwind tables.
6262
}
6363

64-
let callee = AllocatorKind::Default.fn_name(method.name);
64+
let callee = default_fn_name(method.name);
6565
let args: Vec<_> = types.iter().enumerate()
6666
.map(|(index, typ)| context.new_parameter(None, *typ, &format!("param{}", index)))
6767
.collect();

0 commit comments

Comments
 (0)