diff options
| author | Aaron Hill <aa1ronham@gmail.com> | 2019-11-05 00:22:49 -0500 |
|---|---|---|
| committer | Aaron Hill <aa1ronham@gmail.com> | 2019-11-11 15:14:38 -0500 |
| commit | ee2dc4b7287a67a4e6299d61539b742d8f73f0a6 (patch) | |
| tree | 4f2c465e75bcfc88ae139cd21dd8b28ca17b44a9 /src | |
| parent | 4ecb80d5d83a1b781bff1235e3ba5530255c7956 (diff) | |
| download | rust-ee2dc4b7287a67a4e6299d61539b742d8f73f0a6.tar.gz rust-ee2dc4b7287a67a4e6299d61539b742d8f73f0a6.zip | |
Fix debug assertion
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_mir/interpret/terminator.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_mir/interpret/terminator.rs b/src/librustc_mir/interpret/terminator.rs index f1e1c98e44e..4f9e404b2c6 100644 --- a/src/librustc_mir/interpret/terminator.rs +++ b/src/librustc_mir/interpret/terminator.rs @@ -265,6 +265,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { match instance.def { ty::InstanceDef::Intrinsic(..) => { let old_stack = self.cur_frame(); + let old_bb = self.frame().block; M::call_intrinsic(self, span, instance, args, dest, ret, unwind)?; // No stack frame gets pushed, the main loop will just act as if the // call completed. @@ -275,7 +276,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { // then the intrinsic implementation should have // changed the stack frame (otherwise, we'll end // up trying to execute this intrinsic call again) - assert!(self.cur_frame() != old_stack); + debug_assert!(self.cur_frame() != old_stack || self.frame().block != old_bb); } if let Some(dest) = dest { self.dump_place(*dest) |
