diff options
| author | Santiago Pastorino <spastorino@gmail.com> | 2020-11-24 17:04:44 -0300 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2020-11-27 11:23:52 -0300 |
| commit | ac1845a6f053d5b1294c13cfb7be202105c34198 (patch) | |
| tree | a95152d52b6379b220c95cdb33c57ac49d0f1e94 /compiler | |
| parent | 28446ef19eebaee31bbbd2706fed29632ee7b7f9 (diff) | |
| download | rust-ac1845a6f053d5b1294c13cfb7be202105c34198.tar.gz rust-ac1845a6f053d5b1294c13cfb7be202105c34198.zip | |
Fix super_predicates_that_define_assoc_type API doc
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_middle/src/query/mod.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index d7718dea437..925a05c879b 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -442,12 +442,10 @@ rustc_queries! { desc { |tcx| "computing the super traits of `{}`", tcx.def_path_str(key) } } - /// Maps from the `DefId` of a trait to the list of - /// super-predicates. This is a subset of the full list of - /// predicates. We store these in a separate map because we must - /// evaluate them even during type conversion, often before the - /// full predicates are available (note that supertraits have - /// additional acyclicity requirements). + /// The `Option<Ident>` is the name of an associated type. If it is `None`, then this query + /// returns the full set of predicates. If `Some<Ident>`, then the query returns only the + /// subset of super-predicates that reference traits that define the given associated type. + /// This is used to avoid cycles in resolving types like `T::Item`. query super_predicates_that_define_assoc_type(key: (DefId, Option<rustc_span::symbol::Ident>)) -> ty::GenericPredicates<'tcx> { desc { |tcx| "computing the super traits of `{}`{}", tcx.def_path_str(key.0), |
