fix typos
Co-authored-by: Oliver Scherer <github35764891676564198441@oli-obk.de>
This commit is contained in:
parent
d21e0118d0
commit
a505e773a5
2 changed files with 3 additions and 3 deletions
|
@ -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>,
|
||||
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue