[−][src]Function rustc_typeck::collect::item_bounds::associated_type_bounds

pub(in collect::item_bounds) fn associated_type_bounds<'tcx>(
    tcx: TyCtxt<'tcx>,
    assoc_item_def_id: DefId,
    bounds: &'tcx [GenericBound<'tcx>],
    span: Span
) -> &'tcx [(Predicate<'tcx>, Span)]

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 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.