Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions compiler/rustc_query_impl/src/plumbing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,6 @@ macro_rules! define_queries {
$(
pub(crate) mod $name {
use super::*;
use std::marker::PhantomData;
use ::rustc_middle::query::erase::{self, Erased};

pub(crate) mod get_query_incr {
Expand Down Expand Up @@ -724,9 +723,7 @@ macro_rules! define_queries {
}

#[derive(Copy, Clone, Default)]
pub(crate) struct QueryType<'tcx> {
data: PhantomData<&'tcx ()>
}
pub(crate) struct QueryType;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remark: I intend to dismantle and remove QueryDispatcherUnerased (and therefore QueryType) at some point, but no harm in simplifying this now.


const FLAGS: QueryFlags = QueryFlags {
is_anon: is_anon!([$($modifiers)*]),
Expand All @@ -735,7 +732,7 @@ macro_rules! define_queries {
};

impl<'tcx> QueryDispatcherUnerased<'tcx, queries::$name::Storage<'tcx>, FLAGS>
for QueryType<'tcx>
for QueryType
{
type UnerasedValue = queries::$name::Value<'tcx>;

Expand Down Expand Up @@ -811,7 +808,7 @@ macro_rules! define_queries {
encoder: &mut CacheEncoder<'_, 'tcx>,
query_result_index: &mut EncodedDepNodeIndex
) {
$crate::plumbing::encode_query_results::<$name::QueryType<'tcx>, _, _> (
$crate::plumbing::encode_query_results::<$name::QueryType, _, _> (
$name::QueryType::query_dispatcher(tcx),
QueryCtxt::new(tcx),
encoder,
Expand Down Expand Up @@ -1001,7 +998,7 @@ macro_rules! define_queries {
$(
pub(crate) fn $name<'tcx>() -> DepKindVTable<'tcx> {
use super::$name::QueryType;
$crate::plumbing::make_dep_kind_vtable_for_query::<QueryType<'tcx>, _, _>(
$crate::plumbing::make_dep_kind_vtable_for_query::<QueryType, _, _>(
is_eval_always!([$($modifiers)*]),
)
}
Expand Down
Loading