needs_drop_components_with_async in rustc_middle::ty::util - Rust
Description: Returns a list of types such that the given type needs drop if and only if any of the returned types need drop. Returns `Err(AlwaysRequiresDrop)` if this type always needs drop.

Skip to main content

## needs_drop_components_with_async

# Function needs_drop_components_with_async

Source

    pub fn needs_drop_components_with_async<'tcx>(
        tcx: TyCtxt<'tcx>,
        ty: Ty<'tcx>,
        asyncness: Asyncness,
    ) -> Result<SmallVec<[Ty<'tcx>; 2]>, AlwaysRequiresDrop>

Expand description

Returns a list of types such that the given type needs drop if and only if any of the returned types need drop. Returns `Err(AlwaysRequiresDrop)` if this type always needs drop.