about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/query/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-08-28 04:41:43 +0000
committerbors <bors@rust-lang.org>2024-08-28 04:41:43 +0000
commit748c54848dc2964b7e133f945cabe5bc64079947 (patch)
tree14f32cb428fd52d14fbad80911cf7010ec47fb71 /compiler/rustc_middle/src/query/mod.rs
parentd9a2cc4daee38c63b2f69710ed61d40acc32b709 (diff)
parentdbf06d21700aea3edf64875ab0e8573bf63c94e1 (diff)
downloadrust-748c54848dc2964b7e133f945cabe5bc64079947.tar.gz
rust-748c54848dc2964b7e133f945cabe5bc64079947.zip
Auto merge of #129546 - compiler-errors:no-pred-on, r=fee1-dead
Get rid of `predicates_defined_on`

This is the uncontroversial part of #129532. This simply inlines the `predicates_defined_on` into into `predicates_of`. Nothing should change here logically.
Diffstat (limited to 'compiler/rustc_middle/src/query/mod.rs')
-rw-r--r--compiler/rustc_middle/src/query/mod.rs19
1 files changed, 0 insertions, 19 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs
index b748f85253f..c785b235f61 100644
--- a/compiler/rustc_middle/src/query/mod.rs
+++ b/compiler/rustc_middle/src/query/mod.rs
@@ -312,17 +312,6 @@ rustc_queries! {
     /// predicates (where-clauses) that must be proven true in order
     /// to reference it. This is almost always the "predicates query"
     /// that you want.
-    ///
-    /// `predicates_of` builds on `predicates_defined_on` -- in fact,
-    /// it is almost always the same as that query, except for the
-    /// case of traits. For traits, `predicates_of` contains
-    /// an additional `Self: Trait<...>` predicate that users don't
-    /// actually write. This reflects the fact that to invoke the
-    /// trait (e.g., via `Default::default`) you must supply types
-    /// that actually implement the trait. (However, this extra
-    /// predicate gets in the way of some checks, which are intended
-    /// to operate over only the actual where-clauses written by the
-    /// user.)
     query predicates_of(key: DefId) -> ty::GenericPredicates<'tcx> {
         desc { |tcx| "computing predicates of `{}`", tcx.def_path_str(key) }
         cache_on_disk_if { key.is_local() }
@@ -619,14 +608,6 @@ rustc_queries! {
         desc { "getting wasm import module map" }
     }
 
-    /// Maps from the `DefId` of an item (trait/struct/enum/fn) to the
-    /// predicates (where-clauses) directly defined on it. This is
-    /// equal to the `explicit_predicates_of` predicates plus the
-    /// `inferred_outlives_of` predicates.
-    query predicates_defined_on(key: DefId) -> ty::GenericPredicates<'tcx> {
-        desc { |tcx| "computing predicates of `{}`", tcx.def_path_str(key) }
-    }
-
     /// Returns everything that looks like a predicate written explicitly
     /// by the user on a trait item.
     ///