Skip to main content

Module reconstruct_box_drops

Module reconstruct_box_drops 

Source
Expand description

Resugar direct calls to Drop::drop for Box.

Dropping an initialized Box uses drop terminators like any other value. However Box is special: it allows being moved out of. When a partially-moved-out-of Box reaches end of scope, drop elaboration destructs the rest of the value, then calls Drop::drop directly, which is atypical.

This pass recovers this into a builtin operation.

Structs§

Transform

Functions§

trait_ref_is_box_drop 🔒