[−][src]Function rustc_ty::ty::associated_type_projection_predicates

fn associated_type_projection_predicates(
    tcx: TyCtxt<'_>,
    assoc_item_def_id: DefId
) -> &List<Predicate<'_>>

For associated types we allow bounds written on the associated type (type X: Trait) to be used as candidates. We also allow the same bounds when desugared as bounds on the trait where Self::X: Trait.

Note that this filtering is done with the items identity substs to simplify checking that these bounds are met in impls. This means that a bound such as for<'b> <Self as X<'b>>::U: Clone can't be used, as in hr-associated-type-bound-1.rs.