Split AllocatorKind::fn_name in global_fn_name and default_fn_name
This commit is contained in:
parent
4ce20663f7
commit
6ba7c5db07
6 changed files with 17 additions and 18 deletions
|
@ -6,13 +6,12 @@ pub enum AllocatorKind {
|
|||
Default,
|
||||
}
|
||||
|
||||
impl AllocatorKind {
|
||||
pub fn fn_name(&self, base: Symbol) -> String {
|
||||
match *self {
|
||||
AllocatorKind::Global => format!("__rust_{base}"),
|
||||
AllocatorKind::Default => format!("__rdl_{base}"),
|
||||
}
|
||||
}
|
||||
pub fn global_fn_name(base: Symbol) -> String {
|
||||
format!("__rust_{base}")
|
||||
}
|
||||
|
||||
pub fn default_fn_name(base: Symbol) -> String {
|
||||
format!("__rdl_{base}")
|
||||
}
|
||||
|
||||
pub fn alloc_error_handler_name(alloc_error_handler_kind: AllocatorKind) -> &'static str {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue