Remove unused category from macros.
This commit is contained in:
parent
0a4d948b4a
commit
de763701e1
3 changed files with 11 additions and 22 deletions
|
@ -242,24 +242,14 @@ macro_rules! hash_result {
|
|||
};
|
||||
}
|
||||
|
||||
macro_rules! define_queries {
|
||||
(<$tcx:tt> $($category:tt {
|
||||
$($(#[$attr:meta])* [$($modifiers:tt)*] fn $name:ident: $node:ident($($K:tt)*) -> $V:ty,)*
|
||||
},)*) => {
|
||||
define_queries_inner! { <$tcx>
|
||||
$($( $(#[$attr])* category<$category> [$($modifiers)*] fn $name: $node($($K)*) -> $V,)*)*
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! query_helper_param_ty {
|
||||
(DefId) => { impl IntoQueryParam<DefId> };
|
||||
($K:ty) => { $K };
|
||||
}
|
||||
|
||||
macro_rules! define_queries_inner {
|
||||
macro_rules! define_queries {
|
||||
(<$tcx:tt>
|
||||
$($(#[$attr:meta])* category<$category:tt>
|
||||
$($(#[$attr:meta])*
|
||||
[$($modifiers:tt)*] fn $name:ident: $node:ident($($K:tt)*) -> $V:ty,)*) => {
|
||||
|
||||
use std::mem;
|
||||
|
|
|
@ -120,13 +120,13 @@ pub fn print_stats(tcx: TyCtxt<'_>) {
|
|||
}
|
||||
|
||||
macro_rules! print_stats {
|
||||
(<$tcx:tt> $($category:tt {
|
||||
(<$tcx:tt>
|
||||
$($(#[$attr:meta])* [$($modifiers:tt)*] fn $name:ident: $node:ident($K:ty) -> $V:ty,)*
|
||||
},)*) => {
|
||||
) => {
|
||||
fn query_stats(tcx: TyCtxt<'_>) -> Vec<QueryStats> {
|
||||
let mut queries = Vec::new();
|
||||
|
||||
$($(
|
||||
$(
|
||||
queries.push(stats::<
|
||||
crate::dep_graph::DepKind,
|
||||
<TyCtxt<'_> as QueryContext>::Query,
|
||||
|
@ -135,7 +135,7 @@ macro_rules! print_stats {
|
|||
stringify!($name),
|
||||
&tcx.queries.$name,
|
||||
));
|
||||
)*)*
|
||||
)*
|
||||
|
||||
queries
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue