Skip to content

Commit cda6f0c

Browse files
committed
doc fixups from review
1 parent 6d4995f commit cda6f0c

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

compiler/rustc_const_eval/src/interpret/eval_context.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
819819
Ok(())
820820
}
821821

822-
/// Creates a new stack frame, initializes it and pushes it unto the stack.
822+
/// Creates a new stack frame, initializes it and pushes it onto the stack.
823823
/// A private helper for [`push_stack_frame`](InterpCx::push_stack_frame).
824824
fn push_new_stack_frame(
825825
&mut self,
@@ -902,8 +902,8 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
902902
Ok(StackPop { jump, target, destination })
903903
}
904904

905-
/// A private helper for [`push_stack_frame`](InterpCx::push_stack_frame).
906-
/// Returns whatever the cleanup was done.
905+
/// A private helper for [`pop_stack_frame`](InterpCx::pop_stack_frame).
906+
/// Returns `true` if cleanup has been done, `false` otherwise.
907907
fn cleanup_current_frame_locals(&mut self) -> InterpResult<'tcx, bool> {
908908
// Cleanup: deallocate locals.
909909
// Usually we want to clean up (deallocate locals), but in a few rare cases we don't.

compiler/rustc_const_eval/src/interpret/terminator.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -977,11 +977,9 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
977977
// which pushes a new stack frame, with the return address from
978978
// the popped stack frame.
979979
//
980-
// Note that we can't use `pop_stack_frame` as it "executes"
981-
// the goto to the return block, but we don't want to,
982-
// only the tail called function should return to the current
983-
// return block.
984-
980+
// Note that we are using `pop_stack_frame` and not `return_from_current_stack_frame`,
981+
// as the latter "executes" the goto to the return block, but we don't want to,
982+
// only the tail called function should return to the current return block.
985983
M::before_stack_pop(self, self.frame())?;
986984

987985
let StackPop { jump, target, destination } = self.pop_stack_frame(false)?;

tests/ui/explicit-tail-calls/ctfe-collatz-multi-rec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(incomplete_features)]
33
#![feature(explicit_tail_calls)]
44

5-
/// A very unnecessarily complicated "implementation" of the callatz conjecture.
5+
/// A very unnecessarily complicated "implementation" of the Collatz conjecture.
66
/// Returns the number of steps to reach `1`.
77
///
88
/// This is just a test for tail calls, which involves multiple functions calling each other.

0 commit comments

Comments
 (0)