Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
Co-authored-by: Oliver Scherer <github35764891676564198441@oli-obk.de>
  • Loading branch information
RalfJung and oli-obk committed Aug 12, 2020
1 parent d21e011 commit a505e77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/librustc_mir/interpret/eval_context.rs
Expand Up @@ -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<mir::Location, Span>,
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/interpret/intrinsics/caller_location.rs
Expand Up @@ -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];
Expand Down

0 comments on commit a505e77

Please sign in to comment.