Skip to content

Commit 5969712

Browse files
committed
Remove unused AllocatorTy::Bang
1 parent 9e8f683 commit 5969712

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

src/librustc_allocator/expand.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ impl<'a> AllocFnFactory<'a> {
245245
self.cx.expr_ident(self.span, ident)
246246
}
247247

248-
AllocatorTy::ResultPtr | AllocatorTy::Bang | AllocatorTy::Unit => {
248+
AllocatorTy::ResultPtr | AllocatorTy::Unit => {
249249
panic!("can't convert AllocatorTy to an argument")
250250
}
251251
}
@@ -262,8 +262,6 @@ impl<'a> AllocFnFactory<'a> {
262262
(self.ptr_u8(), expr)
263263
}
264264

265-
AllocatorTy::Bang => (self.cx.ty(self.span, TyKind::Never), expr),
266-
267265
AllocatorTy::Unit => (self.cx.ty(self.span, TyKind::Tup(Vec::new())), expr),
268266

269267
AllocatorTy::Layout | AllocatorTy::Usize | AllocatorTy::Ptr => {

src/librustc_allocator/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ pub struct AllocatorMethod {
4747
}
4848

4949
pub enum AllocatorTy {
50-
Bang,
5150
Layout,
5251
Ptr,
5352
ResultPtr,

src/librustc_trans/allocator.rs

-2
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,11 @@ pub(crate) unsafe fn trans(tcx: TyCtxt, mods: &ModuleLlvm, kind: AllocatorKind)
4343
AllocatorTy::Ptr => args.push(i8p),
4444
AllocatorTy::Usize => args.push(usize),
4545

46-
AllocatorTy::Bang |
4746
AllocatorTy::ResultPtr |
4847
AllocatorTy::Unit => panic!("invalid allocator arg"),
4948
}
5049
}
5150
let output = match method.output {
52-
AllocatorTy::Bang => None,
5351
AllocatorTy::ResultPtr => Some(i8p),
5452
AllocatorTy::Unit => None,
5553

0 commit comments

Comments
 (0)