Skip to content

Commit eb37c64

Browse files
committed
Remove incorrect debug assertion in interpret
Cast type may be a subtype of the destination type. There is a later assertion that they have the same layout.
1 parent e305df1 commit eb37c64

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustc_mir/interpret/step.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> InterpretCx<'a, 'mir, 'tcx, M>
259259
)?;
260260
}
261261

262-
Cast(kind, ref operand, cast_ty) => {
263-
debug_assert_eq!(self.monomorphize(cast_ty)?, dest.layout.ty);
262+
Cast(kind, ref operand, _) => {
264263
let src = self.eval_operand(operand, None)?;
265264
self.cast(src, kind, dest)?;
266265
}

0 commit comments

Comments
 (0)