rustc: Remove some dead code
This commit is contained in:
parent
7f397bdb06
commit
de4dbe5789
59 changed files with 64 additions and 1309 deletions
|
@ -8,6 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![deny(warnings)]
|
||||
|
||||
#![feature(rustc_private)]
|
||||
|
||||
extern crate rustc;
|
||||
|
@ -22,61 +24,51 @@ pub static ALLOCATOR_METHODS: &[AllocatorMethod] = &[
|
|||
name: "alloc",
|
||||
inputs: &[AllocatorTy::Layout],
|
||||
output: AllocatorTy::ResultPtr,
|
||||
is_unsafe: true,
|
||||
},
|
||||
AllocatorMethod {
|
||||
name: "oom",
|
||||
inputs: &[AllocatorTy::AllocErr],
|
||||
output: AllocatorTy::Bang,
|
||||
is_unsafe: false,
|
||||
},
|
||||
AllocatorMethod {
|
||||
name: "dealloc",
|
||||
inputs: &[AllocatorTy::Ptr, AllocatorTy::Layout],
|
||||
output: AllocatorTy::Unit,
|
||||
is_unsafe: true,
|
||||
},
|
||||
AllocatorMethod {
|
||||
name: "usable_size",
|
||||
inputs: &[AllocatorTy::LayoutRef],
|
||||
output: AllocatorTy::UsizePair,
|
||||
is_unsafe: false,
|
||||
},
|
||||
AllocatorMethod {
|
||||
name: "realloc",
|
||||
inputs: &[AllocatorTy::Ptr, AllocatorTy::Layout, AllocatorTy::Layout],
|
||||
output: AllocatorTy::ResultPtr,
|
||||
is_unsafe: true,
|
||||
},
|
||||
AllocatorMethod {
|
||||
name: "alloc_zeroed",
|
||||
inputs: &[AllocatorTy::Layout],
|
||||
output: AllocatorTy::ResultPtr,
|
||||
is_unsafe: true,
|
||||
},
|
||||
AllocatorMethod {
|
||||
name: "alloc_excess",
|
||||
inputs: &[AllocatorTy::Layout],
|
||||
output: AllocatorTy::ResultExcess,
|
||||
is_unsafe: true,
|
||||
},
|
||||
AllocatorMethod {
|
||||
name: "realloc_excess",
|
||||
inputs: &[AllocatorTy::Ptr, AllocatorTy::Layout, AllocatorTy::Layout],
|
||||
output: AllocatorTy::ResultExcess,
|
||||
is_unsafe: true,
|
||||
},
|
||||
AllocatorMethod {
|
||||
name: "grow_in_place",
|
||||
inputs: &[AllocatorTy::Ptr, AllocatorTy::Layout, AllocatorTy::Layout],
|
||||
output: AllocatorTy::ResultUnit,
|
||||
is_unsafe: true,
|
||||
},
|
||||
AllocatorMethod {
|
||||
name: "shrink_in_place",
|
||||
inputs: &[AllocatorTy::Ptr, AllocatorTy::Layout, AllocatorTy::Layout],
|
||||
output: AllocatorTy::ResultUnit,
|
||||
is_unsafe: true,
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -84,7 +76,6 @@ pub struct AllocatorMethod {
|
|||
pub name: &'static str,
|
||||
pub inputs: &'static [AllocatorTy],
|
||||
pub output: AllocatorTy,
|
||||
pub is_unsafe: bool,
|
||||
}
|
||||
|
||||
pub enum AllocatorTy {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue