Skip to content

Commit ac1845a

Browse files
committed
Fix super_predicates_that_define_assoc_type API doc
1 parent 28446ef commit ac1845a

File tree

1 file changed

+4
-6
lines changed
  • compiler/rustc_middle/src/query

1 file changed

+4
-6
lines changed

compiler/rustc_middle/src/query/mod.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -442,12 +442,10 @@ rustc_queries! {
442442
desc { |tcx| "computing the super traits of `{}`", tcx.def_path_str(key) }
443443
}
444444

445-
/// Maps from the `DefId` of a trait to the list of
446-
/// super-predicates. This is a subset of the full list of
447-
/// predicates. We store these in a separate map because we must
448-
/// evaluate them even during type conversion, often before the
449-
/// full predicates are available (note that supertraits have
450-
/// additional acyclicity requirements).
445+
/// The `Option<Ident>` is the name of an associated type. If it is `None`, then this query
446+
/// returns the full set of predicates. If `Some<Ident>`, then the query returns only the
447+
/// subset of super-predicates that reference traits that define the given associated type.
448+
/// This is used to avoid cycles in resolving types like `T::Item`.
451449
query super_predicates_that_define_assoc_type(key: (DefId, Option<rustc_span::symbol::Ident>)) -> ty::GenericPredicates<'tcx> {
452450
desc { |tcx| "computing the super traits of `{}`{}",
453451
tcx.def_path_str(key.0),

0 commit comments

Comments
 (0)