Skip to content

Commit 0e871a5

Browse files
committed
Do renames proposed by review
1 parent d4afad1 commit 0e871a5

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

compiler/rustc_const_eval/src/interpret/eval_context.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ pub enum StackPopCleanup {
160160
}
161161

162162
/// Return type of [`InterpCx::pop_stack_frame`].
163-
pub struct StackPop<'tcx, Prov: Provenance> {
163+
pub struct StackPopInfo<'tcx, Prov: Provenance> {
164164
/// Additional information about the action to be performed when returning from the popped
165165
/// stack frame.
166166
pub return_action: ReturnAction,
@@ -890,7 +890,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
890890
pub fn pop_stack_frame(
891891
&mut self,
892892
unwinding: bool,
893-
) -> InterpResult<'tcx, StackPop<'tcx, M::Provenance>> {
893+
) -> InterpResult<'tcx, StackPopInfo<'tcx, M::Provenance>> {
894894
let cleanup = self.cleanup_current_frame_locals()?;
895895

896896
let frame =
@@ -905,7 +905,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
905905
ReturnAction::NoCleanup
906906
};
907907

908-
Ok(StackPop { return_action, return_to_block, return_place })
908+
Ok(StackPopInfo { return_action, return_to_block, return_place })
909909
}
910910

911911
/// A private helper for [`pop_stack_frame`](InterpCx::pop_stack_frame).
@@ -1043,12 +1043,12 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
10431043
};
10441044

10451045
// All right, now it is time to actually pop the frame.
1046-
let frame = self.pop_stack_frame(unwinding)?;
1046+
let stack_pop_info = self.pop_stack_frame(unwinding)?;
10471047

10481048
// Report error from return value copy, if any.
10491049
copy_ret_result?;
10501050

1051-
match frame.return_action {
1051+
match stack_pop_info.return_action {
10521052
ReturnAction::Normal => {}
10531053
ReturnAction::NoJump => {
10541054
// The hook already did everything.
@@ -1066,7 +1066,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
10661066
// Normal return, figure out where to jump.
10671067
if unwinding {
10681068
// Follow the unwind edge.
1069-
let unwind = match frame.return_to_block {
1069+
let unwind = match stack_pop_info.return_to_block {
10701070
StackPopCleanup::Goto { unwind, .. } => unwind,
10711071
StackPopCleanup::Root { .. } => {
10721072
panic!("encountered StackPopCleanup::Root when unwinding!")
@@ -1076,7 +1076,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
10761076
self.unwind_to_block(unwind)
10771077
} else {
10781078
// Follow the normal return edge.
1079-
match frame.return_to_block {
1079+
match stack_pop_info.return_to_block {
10801080
StackPopCleanup::Goto { ret, .. } => self.return_to_block(ret),
10811081
StackPopCleanup::Root { .. } => {
10821082
assert!(

compiler/rustc_const_eval/src/interpret/terminator.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use super::{
2727
};
2828
use crate::{
2929
fluent_generated as fluent,
30-
interpret::{eval_context::StackPop, ReturnAction},
30+
interpret::{eval_context::StackPopInfo, ReturnAction},
3131
};
3232

3333
/// An argment passed to a function.
@@ -982,7 +982,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
982982
// only the tail called function should return to the current return block.
983983
M::before_stack_pop(self, self.frame())?;
984984

985-
let StackPop { return_action, return_to_block, return_place } =
985+
let StackPopInfo { return_action, return_to_block, return_place } =
986986
self.pop_stack_frame(false)?;
987987

988988
assert_eq!(return_action, ReturnAction::Normal);

0 commit comments

Comments
 (0)