Unify query name and node name.
This commit is contained in:
parent
de763701e1
commit
de7da7fd3d
@ -490,7 +490,7 @@ pub fn rustc_queries(input: TokenStream) -> TokenStream {
|
||||
// Add the query to the group
|
||||
query_stream.extend(quote! {
|
||||
#(#doc_comments)*
|
||||
[#attribute_stream] fn #name: #name(#arg) #result,
|
||||
[#attribute_stream] fn #name(#arg) #result,
|
||||
});
|
||||
|
||||
// Create a dep node for the query
|
||||
|
@ -250,7 +250,7 @@ macro_rules! query_helper_param_ty {
|
||||
macro_rules! define_queries {
|
||||
(<$tcx:tt>
|
||||
$($(#[$attr:meta])*
|
||||
[$($modifiers:tt)*] fn $name:ident: $node:ident($($K:tt)*) -> $V:ty,)*) => {
|
||||
[$($modifiers:tt)*] fn $name:ident($($K:tt)*) -> $V:ty,)*) => {
|
||||
|
||||
use std::mem;
|
||||
use crate::{
|
||||
@ -356,7 +356,7 @@ pub mod query_values {
|
||||
impl<$tcx> QueryAccessors<TyCtxt<$tcx>> for queries::$name<$tcx> {
|
||||
const ANON: bool = is_anon!([$($modifiers)*]);
|
||||
const EVAL_ALWAYS: bool = is_eval_always!([$($modifiers)*]);
|
||||
const DEP_KIND: dep_graph::DepKind = dep_graph::DepKind::$node;
|
||||
const DEP_KIND: dep_graph::DepKind = dep_graph::DepKind::$name;
|
||||
|
||||
type Cache = query_storage!([$($modifiers)*][$($K)*, $V]);
|
||||
|
||||
|
@ -121,7 +121,7 @@ pub fn print_stats(tcx: TyCtxt<'_>) {
|
||||
|
||||
macro_rules! print_stats {
|
||||
(<$tcx:tt>
|
||||
$($(#[$attr:meta])* [$($modifiers:tt)*] fn $name:ident: $node:ident($K:ty) -> $V:ty,)*
|
||||
$($(#[$attr:meta])* [$($modifiers:tt)*] fn $name:ident($K:ty) -> $V:ty,)*
|
||||
) => {
|
||||
fn query_stats(tcx: TyCtxt<'_>) -> Vec<QueryStats> {
|
||||
let mut queries = Vec::new();
|
||||
|
Loading…
Reference in New Issue
Block a user