From a505e773a54bd40840e80e2038b0f634aed02c77 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 12 Aug 2020 08:50:17 +0200 Subject: [PATCH] fix typos Co-authored-by: Oliver Scherer --- src/librustc_mir/interpret/eval_context.rs | 4 ++-- src/librustc_mir/interpret/intrinsics/caller_location.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustc_mir/interpret/eval_context.rs b/src/librustc_mir/interpret/eval_context.rs index b12df60d061..525da87463a 100644 --- a/src/librustc_mir/interpret/eval_context.rs +++ b/src/librustc_mir/interpret/eval_context.rs @@ -84,7 +84,7 @@ pub struct Frame<'mir, 'tcx, Tag = (), Extra = ()> { // Current position within the function //////////////////////////////////////////////////////////////////////////////// /// If this is `Err`, we are not currently executing any particular statement in - /// this frame (can happen e.g. during frame initialziation, and during unwinding on + /// this frame (can happen e.g. during frame initialization, and during unwinding on /// frames without cleanup code). /// We basically abuse `Result` as `Either`. pub(super) loc: Result, @@ -663,7 +663,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { let const_ = self.subst_from_current_frame_and_normalize_erasing_regions(const_.literal); self.const_to_op(const_, None).map_err(|err| { - // If there was an error, set the span of the current frame so this constant. + // If there was an error, set the span of the current frame to this constant. // Avoiding doing this when evaluation succeeds. self.frame_mut().loc = Err(span); err diff --git a/src/librustc_mir/interpret/intrinsics/caller_location.rs b/src/librustc_mir/interpret/intrinsics/caller_location.rs index 74cb7f6fc5f..fb3a670714b 100644 --- a/src/librustc_mir/interpret/intrinsics/caller_location.rs +++ b/src/librustc_mir/interpret/intrinsics/caller_location.rs @@ -30,7 +30,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { // Assert that there is always such a frame. .unwrap(); // Assert that the frame we look at is actually executing code currently - // (`loc` is None when we are unwinding and the frame does not require cleanup). + // (`loc` is `Err` when we are unwinding and the frame does not require cleanup). let loc = frame.loc.unwrap(); // If this is a `Call` terminator, use the `fn_span` instead. let block = &frame.body.basic_blocks()[loc.block];