We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a175f36 commit 9e0538bCopy full SHA for 9e0538b
compiler/rustc_infer/src/traits/util.rs
@@ -90,6 +90,11 @@ pub fn elaborate_trait_refs<'tcx>(
90
elaborate_predicates(tcx, predicates)
91
}
92
93
+/// A specialized variant of `elaborate_trait_refs` that only elaborates trait references that may
94
+/// define the given associated type `assoc_name`. It uses the
95
+/// `super_predicates_that_define_assoc_type` query to avoid enumerating super-predicates that
96
+/// aren't related to `assoc_item`. This is used when resolving types like `Self::Item` or
97
+/// `T::Item` and helps to avoid cycle errors (see e.g. #35237).
98
pub fn elaborate_trait_refs_that_define_assoc_type<'tcx>(
99
tcx: TyCtxt<'tcx>,
100
trait_refs: impl Iterator<Item = ty::PolyTraitRef<'tcx>>,
0 commit comments