[−][src]Function rustc_trait_selection::traits::structural_match::type_marked_structural

pub(in traits::structural_match) fn type_marked_structural<'tcx>(
    infcx: &InferCtxt<'_, 'tcx>,
    adt_ty: Ty<'tcx>,
    cause: ObligationCause<'tcx>
) -> bool

This method returns true if and only if adt_ty itself has been marked as eligible for structural-match: namely, if it implements both StructuralPartialEq and StructuralEq (which are respectively injected by #[derive(PartialEq)] and #[derive(Eq)]).

Note that this does not recursively check if the substructure of adt_ty implements the traits.