Skip to content

Commit fe3e1c1

Browse files
committed
Add doc comment
1 parent 64a43f4 commit fe3e1c1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/librustc_mir/interpret/eval_context.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,19 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
551551
}
552552
}
553553

554+
/// Pops the current frame from the stack, deallocating the
555+
/// memory for allocated locals.
556+
///
557+
/// If `unwinding` is `false`, then we are performing a normal return
558+
/// from a function. In this case, we jump back into the frame of the caller,
559+
/// and continue execution as normal.
560+
///
561+
/// If `unwinding` is `true`, then we are in the middle of a panic,
562+
/// and need to unwind this frame. In this case, we jump to the
563+
/// `cleanup` block for the function, which is responsible for running
564+
/// `Drop` impls for any locals that have been initialized at this point.
565+
/// The cleanup block ends with a special `Resume` terminator, which will
566+
/// cause us to continue unwinding where we left off.
554567
pub(super) fn pop_stack_frame(
555568
&mut self,
556569
unwinding: bool

0 commit comments

Comments
 (0)