about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/query/mod.rs
diff options
context:
space:
mode:
authorbohan <bohan-zhang@foxmail.com>2025-07-13 02:52:03 +0800
committerbohan <bohan-zhang@foxmail.com>2025-07-13 02:52:13 +0800
commit47e15d90e13b5238117971298a3573ddebd87a40 (patch)
treea87477f39fa2912da6a28b2f1a13f6f0f6a77af2 /compiler/rustc_middle/src/query/mod.rs
parentdc6c3300fcf520b2931355e922caa66758becb71 (diff)
downloadrust-47e15d90e13b5238117971298a3573ddebd87a40.tar.gz
rust-47e15d90e13b5238117971298a3573ddebd87a40.zip
query RPITIT in a trait or impl
Diffstat (limited to 'compiler/rustc_middle/src/query/mod.rs')
-rw-r--r--compiler/rustc_middle/src/query/mod.rs16
1 files changed, 2 insertions, 14 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs
index 49c36a3ff16..3da6c6f5fe1 100644
--- a/compiler/rustc_middle/src/query/mod.rs
+++ b/compiler/rustc_middle/src/query/mod.rs
@@ -1079,21 +1079,9 @@ rustc_queries! {
         desc { |tcx| "comparing impl items against trait for `{}`", tcx.def_path_str(impl_id) }
     }
 
-    /// Given `fn_def_id` of a trait or of an impl that implements a given trait:
-    /// if `fn_def_id` is the def id of a function defined inside a trait, then it creates and returns
-    /// the associated items that correspond to each impl trait in return position for that trait.
-    /// if `fn_def_id` is the def id of a function defined inside an impl that implements a trait, then it
-    /// creates and returns the associated items that correspond to each impl trait in return position
-    /// of the implemented trait.
-    query associated_types_for_impl_traits_in_associated_fn(fn_def_id: DefId) -> &'tcx [DefId] {
-        desc { |tcx| "creating associated items for opaque types returned by `{}`", tcx.def_path_str(fn_def_id) }
-        cache_on_disk_if { fn_def_id.is_local() }
-        separate_provide_extern
-    }
-
-    query associated_types_for_impl_traits_in_trait(trait_id: DefId) -> &'tcx DefIdMap<&'tcx [DefId]> {
+    query associated_types_for_impl_traits_in_trait_or_impl(did: DefId) -> &'tcx ty::AssocTyForImplTraitInTraitOrImpl {
         arena_cache
-        desc { |tcx| "creating associated items for trait `{}`", tcx.def_path_str(trait_id) }
+        desc { |tcx| "creating rpitit for `{}`", tcx.def_path_str(did) }
         separate_provide_extern
     }