Split AllocatorKind::fn_name in global_fn_name and default_fn_name

This commit is contained in:
bjorn3 2021-07-03 17:50:53 +02:00 committed by bjorn3
parent 4ce20663f7
commit 6ba7c5db07
6 changed files with 17 additions and 18 deletions

View file

@ -1,7 +1,7 @@
use crate::util::check_builtin_macro_attribute;
use rustc_ast::expand::allocator::{
AllocatorKind, AllocatorMethod, AllocatorTy, ALLOCATOR_METHODS,
global_fn_name, AllocatorMethod, AllocatorTy, ALLOCATOR_METHODS,
};
use rustc_ast::ptr::P;
use rustc_ast::{self as ast, AttrVec, Expr, FnHeader, FnSig, Generics, Param, StmtKind};
@ -90,7 +90,7 @@ impl AllocFnFactory<'_, '_> {
}));
let item = self.cx.item(
self.span,
Ident::from_str_and_span(&AllocatorKind::Global.fn_name(method.name), self.span),
Ident::from_str_and_span(&global_fn_name(method.name), self.span),
self.attrs(),
kind,
);