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")
}
}
(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 => {
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,