diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index cb54edb2952..30ca93c7233 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -246,7 +246,7 @@ mod make_query { // Create an eponymous constructor for each query. $(#[allow(nonstandard_style)] $(#[$attr])* - pub fn $name<'tcx>(tcx: QueryCtxt<'tcx>, key: query_keys::$name<'tcx>) -> QueryStackFrame { + pub fn $name<'tcx>(tcx: QueryCtxt<'tcx>, key: as QueryConfig>::Key) -> QueryStackFrame { let kind = dep_graph::DepKind::$name; let name = stringify!($name); // Disable visible paths printing for performance reasons. @@ -348,7 +348,6 @@ fn make_vtable(tcx: QueryCtxt<'tcx>, key: &Self::Key) -> mod query_callbacks { use super::*; use rustc_middle::dep_graph::DepNode; - use rustc_middle::ty::query::query_keys; use rustc_query_system::dep_graph::DepNodeParams; use rustc_query_system::query::{force_query, QueryDescription}; use rustc_query_system::dep_graph::FingerprintStyle; @@ -410,7 +409,7 @@ pub fn CompileMonoItem() -> DepKindStruct { let is_eval_always = is_eval_always!([$($modifiers)*]); let fingerprint_style = - as DepNodeParams>>::fingerprint_style(); + < as QueryConfig>::Key as DepNodeParams>>::fingerprint_style(); if is_anon || !fingerprint_style.reconstructible() { return DepKindStruct { @@ -423,8 +422,8 @@ pub fn CompileMonoItem() -> DepKindStruct { } #[inline(always)] - fn recover<'tcx>(tcx: TyCtxt<'tcx>, dep_node: DepNode) -> Option> { - as DepNodeParams>>::recover(tcx, &dep_node) + fn recover<'tcx>(tcx: TyCtxt<'tcx>, dep_node: DepNode) -> Option< as QueryConfig>::Key> { + < as QueryConfig>::Key as DepNodeParams>>::recover(tcx, &dep_node) } fn force_from_dep_node(tcx: TyCtxt<'_>, dep_node: DepNode) -> bool { @@ -475,7 +474,7 @@ pub struct Queries<'tcx> { jobs: AtomicU64, - $($(#[$attr])* $name: QueryState>,)* + $($(#[$attr])* $name: QueryState< as QueryConfig>::Key>,)* } impl<'tcx> Queries<'tcx> { @@ -530,7 +529,7 @@ fn $name( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, - key: query_keys::$name<'tcx>, + key: as QueryConfig>::Key, mode: QueryMode, ) -> Option> { let qcx = QueryCtxt { tcx, queries: self };