rustc_mir_dataflow::elaborate_drops

Function elaborate_drop

source
pub fn elaborate_drop<'b, 'tcx, D>(
    elaborator: &mut D,
    source_info: SourceInfo,
    place: Place<'tcx>,
    path: D::Path,
    succ: BasicBlock,
    unwind: Unwind,
    bb: BasicBlock,
)
where D: DropElaborator<'b, 'tcx>, 'tcx: 'b,
Expand description

“Elaborates” a drop of place/path and patches bb’s terminator to execute it.

The passed elaborator is used to determine what should happen at the drop terminator. It decides whether the drop can be statically determined or whether it needs a dynamic drop flag, and whether the drop is “open”, ie. should be expanded to drop all subfields of the dropped value.

When this returns, the MIR patch in the elaborator contains the necessary changes.