Skip to content

Commit

Permalink
pacify merciless fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Niko Matsakis committed Dec 19, 2024
1 parent b535061 commit 6564403
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions compiler/rustc_mir_build/src/builder/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1396,9 +1396,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
}

/// Builds drops for `pop_scope` and `leave_top_scope`.
///
///
/// # Parameters
///
///
/// * `unwind_drops`, the drop tree data structure storing what needs to be cleaned up if unwind occurs
/// * `scope`, describes the drops that will occur on exiting the scope in regular execution
/// * `block`, the block to branch to once drops are complete (assuming no unwind occurs)
Expand Down Expand Up @@ -1436,14 +1436,14 @@ fn build_scope_drops<'tcx>(
// statement. For other functions we don't worry about StorageDead. The
// drops for the unwind path should have already been generated by
// `diverge_cleanup_gen`.

// `unwind_to` indicates what needs to be dropped should unwinding occur.
// This is a subset of what needs to be dropped when exiting the scope.
// As we unwind the scope, we will also move `unwind_to` backwards to match,
// so that we can use it should a destructor panic.
let mut unwind_to = unwind_to;

// The block that we should jump to after drops complete. We start by building the final drop (`drops[n]`
// The block that we should jump to after drops complete. We start by building the final drop (`drops[n]`
// in the diagram above) and then build the drops (e.g., `drop[1]`, `drop[0]`) that come before it.
// block begins as the successor of `drops[n]` and then becomes `drops[n]` so that `drops[n-1]`
// will branch to `drops[n]`.
Expand Down Expand Up @@ -1492,7 +1492,7 @@ fn build_scope_drops<'tcx>(
continue;
}

// As in the `DropKind::Storage` case below:
// As in the `DropKind::Storage` case below:
// normally lint-related drops are not emitted for unwind,
// so we can just leave `unwind_to` unmodified, but in some
// cases we emit things ALSO on the unwind path, so we need to adjust
Expand Down

0 comments on commit 6564403

Please sign in to comment.