fn build_scope_drops<'tcx, F>(
cfg: &mut CFG<'tcx>,
unwind_drops: &mut DropTree,
coroutine_drops: &mut DropTree,
scope: &Scope,
block: BasicBlock,
unwind_to: DropIdx,
dropline_to: Option<DropIdx>,
storage_dead_on_unwind: bool,
arg_count: usize,
is_async_drop: F,
) -> BlockAnd<()>Expand description
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 occursscope, describes the drops that will occur on exiting the scope in regular executionblock, the block to branch to once drops are complete (assuming no unwind occurs)unwind_to, describes the drops that would occur at this point in the code if a panic occurred (a subset of the drops inscope, since we sometimes elide StorageDead and other instructions on unwinding)dropline_to, describes the drops that would occur at this point in the code if a coroutine drop occurred.storage_dead_on_unwind, if true, then we should emitStorageDeadeven when unwindingarg_count, number of MIR local variables corresponding to fn arguments (used to assert that we don’t drop those)