]> git.lizzy.rs Git - rust.git/blob - src/librustc/middle/allocator.rs
Auto merge of #61203 - memoryruins:bare_trait_objects, r=Centril
[rust.git] / src / librustc / middle / allocator.rs
1 #[derive(Clone, Copy)]
2 pub enum AllocatorKind {
3     Global,
4     DefaultLib,
5     DefaultExe,
6 }
7
8 impl AllocatorKind {
9     pub fn fn_name(&self, base: &str) -> String {
10         match *self {
11             AllocatorKind::Global => format!("__rg_{}", base),
12             AllocatorKind::DefaultLib => format!("__rdl_{}", base),
13             AllocatorKind::DefaultExe => format!("__rde_{}", base),
14         }
15     }
16 }