Skip to main content

build_drop_shim

Function build_drop_shim 

Source
pub fn build_drop_shim<'tcx>(
    tcx: TyCtxt<'tcx>,
    def_id: DefId,
    ty: Option<Ty<'tcx>>,
    typing_env: TypingEnv<'tcx>,
) -> Body<'tcx>
Expand description

Exposed for rustc drivers. Builds the drop glue for the provided type. The def_id is that of core::ptr::drop_glue.

Inside rustc this is only called on a monomorphic type, but we expose the function for rustc_driver writers to be able to generate drop glue for a polymorphic type.