Remove unused AllocatorTy::Bang

This commit is contained in:
Steven Fackler 2018-04-21 15:16:59 -07:00
parent 9e8f683476
commit 5969712c3f
3 changed files with 1 additions and 6 deletions

View File

@ -245,7 +245,7 @@ impl<'a> AllocFnFactory<'a> {
self.cx.expr_ident(self.span, ident)
}
AllocatorTy::ResultPtr | AllocatorTy::Bang | AllocatorTy::Unit => {
AllocatorTy::ResultPtr | AllocatorTy::Unit => {
panic!("can't convert AllocatorTy to an argument")
}
}
@ -262,8 +262,6 @@ impl<'a> AllocFnFactory<'a> {
(self.ptr_u8(), expr)
}
AllocatorTy::Bang => (self.cx.ty(self.span, TyKind::Never), expr),
AllocatorTy::Unit => (self.cx.ty(self.span, TyKind::Tup(Vec::new())), expr),
AllocatorTy::Layout | AllocatorTy::Usize | AllocatorTy::Ptr => {

View File

@ -47,7 +47,6 @@ pub struct AllocatorMethod {
}
pub enum AllocatorTy {
Bang,
Layout,
Ptr,
ResultPtr,

View File

@ -43,13 +43,11 @@ pub(crate) unsafe fn trans(tcx: TyCtxt, mods: &ModuleLlvm, kind: AllocatorKind)
AllocatorTy::Ptr => args.push(i8p),
AllocatorTy::Usize => args.push(usize),
AllocatorTy::Bang |
AllocatorTy::ResultPtr |
AllocatorTy::Unit => panic!("invalid allocator arg"),
}
}
let output = match method.output {
AllocatorTy::Bang => None,
AllocatorTy::ResultPtr => Some(i8p),
AllocatorTy::Unit => None,