pub fn build_drop_shim<'tcx>(
tcx: TyCtxt<'tcx>,
def_id: DefId,
ty: Option<Ty<'tcx>>,
typing_env: TypingEnv<'tcx>,
) -> Body<'tcx>Expand description
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.