Document elaborate_trait_refs_that_define_assoc_type
This commit is contained in:
parent
a175f36c95
commit
9e0538bd07
1 changed files with 5 additions and 0 deletions
|
@ -90,6 +90,11 @@ pub fn elaborate_trait_refs<'tcx>(
|
||||||
elaborate_predicates(tcx, predicates)
|
elaborate_predicates(tcx, predicates)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// A specialized variant of `elaborate_trait_refs` that only elaborates trait references that may
|
||||||
|
/// define the given associated type `assoc_name`. It uses the
|
||||||
|
/// `super_predicates_that_define_assoc_type` 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).
|
||||||
pub fn elaborate_trait_refs_that_define_assoc_type<'tcx>(
|
pub fn elaborate_trait_refs_that_define_assoc_type<'tcx>(
|
||||||
tcx: TyCtxt<'tcx>,
|
tcx: TyCtxt<'tcx>,
|
||||||
trait_refs: impl Iterator<Item = ty::PolyTraitRef<'tcx>>,
|
trait_refs: impl Iterator<Item = ty::PolyTraitRef<'tcx>>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue