From 1d1ff362143facf95e91cb98cbe4957c6165bc11 Mon Sep 17 00:00:00 2001 From: DrMeepster <19316085+DrMeepster@users.noreply.github.com> Date: Wed, 18 May 2022 21:49:46 -0700 Subject: [PATCH] fix codegen assertion --- compiler/rustc_codegen_ssa/src/mir/operand.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_codegen_ssa/src/mir/operand.rs b/compiler/rustc_codegen_ssa/src/mir/operand.rs index e8fab8045241..2e655ae94cc8 100644 --- a/compiler/rustc_codegen_ssa/src/mir/operand.rs +++ b/compiler/rustc_codegen_ssa/src/mir/operand.rs @@ -118,8 +118,8 @@ impl<'a, 'tcx, V: CodegenObject> OperandRef<'tcx, V> { } pub fn deref>(self, cx: &Cx) -> PlaceRef<'tcx, V> { - if self.layout.ty.is_box() && !self.layout.abi.is_scalar() { - bug!("dereferencing non-scalar box ({:?}) in codegen", self.layout.ty); + if self.layout.ty.is_box() { + bug!("dereferencing {:?} in codegen", self.layout.ty); } let projected_ty = self