clippy_utils::ty

Function contains_adt_constructor

Source
pub fn contains_adt_constructor<'tcx>(ty: Ty<'tcx>, adt: AdtDef<'tcx>) -> bool
Expand description

Walks into ty and returns true if any inner type is an instance of the given adt constructor.