Skip to content

Commit 8f9472c

Browse files
committed
Only mention that a stack frame is being popped when starting to do so
1 parent 43c181b commit 8f9472c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

compiler/rustc_mir/src/interpret/eval_context.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,10 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
783783
/// The cleanup block ends with a special `Resume` terminator, which will
784784
/// cause us to continue unwinding.
785785
pub(super) fn pop_stack_frame(&mut self, unwinding: bool) -> InterpResult<'tcx> {
786-
info!(unwinding);
786+
info!(
787+
"popping stack frame ({})",
788+
if unwinding { "during unwinding" } else { "returning from function" }
789+
);
787790

788791
// Sanity check `unwinding`.
789792
assert_eq!(
@@ -854,10 +857,6 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
854857
}
855858
}
856859

857-
if !self.stack().is_empty() {
858-
info!(unwinding);
859-
}
860-
861860
Ok(())
862861
}
863862

0 commit comments

Comments
 (0)