fn associated_type_bounds<'tcx>(
    tcx: TyCtxt<'tcx>,
    assoc_item_def_id: LocalDefId,
    hir_bounds: &'tcx [GenericBound<'tcx>],
    span: Span,
    filter: PredicateFilter
) -> &'tcx [(Clause<'tcx>, Span)]
Expand description

For associated types we include both bounds written on the type (type X: Trait) and predicates from the trait: where Self::X: Trait.

Note that this filtering is done with the items identity args 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.