Function rustc_ty_utils::needs_drop::filter_array_elements
source · fn filter_array_elements<'tcx>(
tcx: TyCtxt<'tcx>,
param_env: ParamEnv<'tcx>
) -> impl Fn(&Result<Ty<'tcx>, AlwaysRequiresDrop>) -> bool
Expand description
HACK: in order to not mistakenly assume that [PhantomData<T>; N]
requires drop glue
we check the element type for drop glue. The correct fix would be looking at the
entirety of the code around needs_drop_components
and this file and come up with
logic that is easier to follow while not repeating any checks that may thus diverge.