Skip to content

Commit ee2dc4b

Browse files
committed
Fix debug assertion
1 parent 4ecb80d commit ee2dc4b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustc_mir/interpret/terminator.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
265265
match instance.def {
266266
ty::InstanceDef::Intrinsic(..) => {
267267
let old_stack = self.cur_frame();
268+
let old_bb = self.frame().block;
268269
M::call_intrinsic(self, span, instance, args, dest, ret, unwind)?;
269270
// No stack frame gets pushed, the main loop will just act as if the
270271
// call completed.
@@ -275,7 +276,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
275276
// then the intrinsic implementation should have
276277
// changed the stack frame (otherwise, we'll end
277278
// up trying to execute this intrinsic call again)
278-
assert!(self.cur_frame() != old_stack);
279+
debug_assert!(self.cur_frame() != old_stack || self.frame().block != old_bb);
279280
}
280281
if let Some(dest) = dest {
281282
self.dump_place(*dest)

0 commit comments

Comments
 (0)