]> git.lizzy.rs Git - rust.git/commitdiff
Remove Q parameter from alloc_self_profile_query_strings_for_query_cache.
authorCamille GILLOT <gillot.camille@gmail.com>
Fri, 6 Mar 2020 19:17:03 +0000 (20:17 +0100)
committerCamille GILLOT <gillot.camille@gmail.com>
Mon, 16 Mar 2020 08:42:34 +0000 (09:42 +0100)
src/librustc/ty/query/plumbing.rs
src/librustc/ty/query/profiling_support.rs

index e4d0e96d07c75f5adc5e79ae96394841a6c03f21..98d8de89d8e9e924bd6f56af7d175661b87bd3fd 100644 (file)
@@ -1043,7 +1043,7 @@ pub fn alloc_self_profile_query_strings(self) {
                 let mut string_cache = QueryKeyStringCache::new();
 
                 $({
-                    alloc_self_profile_query_strings_for_query_cache::<queries::$name<'_>>(
+                    alloc_self_profile_query_strings_for_query_cache(
                         self,
                         stringify!($name),
                         &self.queries.$name,
index 99ada34d59ebed13c5b4829e107e0be83f973c40..290e37f2cf8259c12fd89bc38b558e9e8ea68aa3 100644 (file)
@@ -1,7 +1,7 @@
 use crate::hir::map::definitions::DefPathData;
 use crate::ty::context::TyCtxt;
-use crate::ty::query::config::QueryAccessors;
-use crate::ty::query::plumbing::QueryState;
+use crate::ty::query::caches::QueryCache;
+use crate::ty::query::plumbing::QueryStateImpl;
 use measureme::{StringComponent, StringId};
 use rustc_data_structures::fx::FxHashMap;
 use rustc_data_structures::profiling::SelfProfiler;
@@ -157,13 +157,14 @@ impl<T0, T1> IntoSelfProfilingString for (T0, T1)
 /// Allocate the self-profiling query strings for a single query cache. This
 /// method is called from `alloc_self_profile_query_strings` which knows all
 /// the queries via macro magic.
-pub(super) fn alloc_self_profile_query_strings_for_query_cache<'tcx, Q>(
+pub(super) fn alloc_self_profile_query_strings_for_query_cache<'tcx, K, V, C>(
     tcx: TyCtxt<'tcx>,
     query_name: &'static str,
-    query_state: &QueryState<'tcx, Q>,
+    query_state: &QueryStateImpl<'tcx, K, V, C>,
     string_cache: &mut QueryKeyStringCache,
 ) where
-    Q: QueryAccessors<'tcx>,
+    K: Debug + Clone,
+    C: QueryCache<K, V>,
 {
     tcx.prof.with_profiler(|profiler| {
         let event_id_builder = profiler.event_id_builder();