cg_llvm: clean up match

This commit is contained in:
Erik Desjardins 2023-07-29 16:32:03 -04:00
parent def44c5669
commit cf7788d54b

View File

@ -225,7 +225,7 @@ fn llvm_type<'a>(&self, cx: &CodegenCx<'a, 'tcx>) -> &'a Type {
return llty;
}
let llty = match *self.ty.kind() {
ty::Ref(..) | ty::RawPtr(ty::TypeAndMut { .. }) => cx.type_ptr(),
ty::Ref(..) | ty::RawPtr(_) => cx.type_ptr(),
ty::Adt(def, _) if def.is_box() => cx.type_ptr(),
ty::FnPtr(sig) => {
cx.fn_ptr_backend_type(cx.fn_abi_of_fn_ptr(sig, ty::List::empty()))