mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-03 10:33:34 +00:00
Document elaborate_trait_refs_that_define_assoc_type
This commit is contained in:
parent
a175f36c95
commit
9e0538bd07
@ -90,6 +90,11 @@ pub fn elaborate_trait_refs<'tcx>(
|
||||
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>(
|
||||
tcx: TyCtxt<'tcx>,
|
||||
trait_refs: impl Iterator<Item = ty::PolyTraitRef<'tcx>>,
|
||||
|
Loading…
Reference in New Issue
Block a user