]> git.lizzy.rs Git - rust.git/commitdiff
Remove unused AllocatorTy::Bang
authorSteven Fackler <sfackler@gmail.com>
Sat, 21 Apr 2018 22:16:59 +0000 (15:16 -0700)
committerSteven Fackler <sfackler@gmail.com>
Sun, 22 Apr 2018 17:08:49 +0000 (10:08 -0700)
src/librustc_allocator/expand.rs
src/librustc_allocator/lib.rs
src/librustc_trans/allocator.rs

index ffd02108c270e4352ba97ecb342cc85038c59030..9338d000c1291aeb24dff3b95cf3e29499b66630 100644 (file)
@@ -245,7 +245,7 @@ fn arg_ty(
                 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 @@ fn ret_ty(&self, ty: &AllocatorTy, expr: P<Expr>) -> (P<Ty>, P<Expr>) {
                 (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 => {
index f3103e2160698ccc679c1a04ef03478a4fff8979..969086815ded4777c3cc6939d9e3be4fc58be6b0 100644 (file)
@@ -47,7 +47,6 @@ pub struct AllocatorMethod {
 }
 
 pub enum AllocatorTy {
-    Bang,
     Layout,
     Ptr,
     ResultPtr,
index f2dd2ed8460ebbfa65d1776cae8d703d1a5c8d1b..ffebb959ebfde494abdd58d680e008da35f76f18 100644 (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,