diff --git a/compiler/rustc_query_impl/src/dep_kind_vtables.rs b/compiler/rustc_query_impl/src/dep_kind_vtables.rs index 947e3184e438..882e59cfa1f3 100644 --- a/compiler/rustc_query_impl/src/dep_kind_vtables.rs +++ b/compiler/rustc_query_impl/src/dep_kind_vtables.rs @@ -131,10 +131,10 @@ pub(crate) fn make_dep_kind_vtable_for_query<'tcx, Q, Cache>( is_eval_always, key_fingerprint_style, force_from_dep_node: Some(|tcx, dep_node, _| { - force_from_dep_node_inner(Q::query_dispatcher(tcx), tcx, dep_node) + force_from_dep_node_inner(Q::query_vtable(tcx), tcx, dep_node) }), try_load_from_on_disk_cache: Some(|tcx, dep_node| { - try_load_from_on_disk_cache_inner(Q::query_dispatcher(tcx), tcx, dep_node) + try_load_from_on_disk_cache_inner(Q::query_vtable(tcx), tcx, dep_node) }), } } diff --git a/compiler/rustc_query_impl/src/lib.rs b/compiler/rustc_query_impl/src/lib.rs index 77221cf28705..41a947bb4a84 100644 --- a/compiler/rustc_query_impl/src/lib.rs +++ b/compiler/rustc_query_impl/src/lib.rs @@ -50,7 +50,7 @@ trait QueryDispatcherUnerased<'tcx, C: QueryCache> { type UnerasedValue; - fn query_dispatcher(tcx: TyCtxt<'tcx>) -> &'tcx QueryVTable<'tcx, C>; + fn query_vtable(tcx: TyCtxt<'tcx>) -> &'tcx QueryVTable<'tcx, C>; fn restore_val(value: C::Value) -> Self::UnerasedValue; } diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index 148979b9467f..bee53a46c1b7 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -501,7 +501,7 @@ pub(crate) fn __rust_end_short_backtrace<'tcx>( #[cfg(debug_assertions)] let _guard = tracing::span!(tracing::Level::TRACE, stringify!($name), ?key).entered(); execution::get_query_incr( - QueryType::query_dispatcher(tcx), + &tcx.query_system.query_vtables.$name, tcx, span, key, @@ -521,7 +521,7 @@ pub(crate) fn __rust_end_short_backtrace<'tcx>( __mode: QueryMode, ) -> Option>> { Some(execution::get_query_non_incr( - QueryType::query_dispatcher(tcx), + &tcx.query_system.query_vtables.$name, tcx, span, key, @@ -628,7 +628,7 @@ impl<'tcx> QueryDispatcherUnerased<'tcx, queries::$name::Storage<'tcx>> type UnerasedValue = queries::$name::Value<'tcx>; #[inline(always)] - fn query_dispatcher(tcx: TyCtxt<'tcx>) + fn query_vtable(tcx: TyCtxt<'tcx>) -> &'tcx QueryVTable<'tcx, queries::$name::Storage<'tcx>> { &tcx.query_system.query_vtables.$name @@ -697,7 +697,7 @@ pub(crate) fn encode_query_results<'tcx>( query_impl::$name::QueryType<'tcx>, _ > ( - query_impl::$name::QueryType::query_dispatcher(tcx), + &tcx.query_system.query_vtables.$name, tcx, encoder, query_result_index, @@ -707,7 +707,7 @@ pub(crate) fn encode_query_results<'tcx>( pub(crate) fn query_key_hash_verify<'tcx>(tcx: TyCtxt<'tcx>) { $crate::plumbing::query_key_hash_verify( - query_impl::$name::QueryType::query_dispatcher(tcx), + &tcx.query_system.query_vtables.$name, tcx, ) }