pub fn transitive_bounds_that_define_assoc_item<'tcx>(
tcx: TyCtxt<'tcx>,
bounds: impl Iterator<Item = Binder<'tcx, TraitRef<'tcx>>>,
assoc_name: Ident
) -> impl Iterator<Item = Binder<'tcx, TraitRef<'tcx>>>
Expand description
A specialized variant of elaborate
that only elaborates trait references that may
define the given associated item with the name assoc_name
. It uses the
super_predicates_that_define_assoc_item
query to avoid enumerating super-predicates that
aren’t related to assoc_item
. This is used when resolving types like Self::Item
or
T::Item
and helps to avoid cycle errors (see e.g. #35237).