diff options
| author | Joshua Nelson <jnelson@cloudflare.com> | 2022-08-29 17:45:18 -0500 |
|---|---|---|
| committer | Joshua Nelson <jnelson@cloudflare.com> | 2022-09-06 21:43:15 -0500 |
| commit | 05886e28a4c3fbb7bc22d56bf5a52ba7cfa491d9 (patch) | |
| tree | b75824da9685ce91f557a81b3204dbba8c5863ed /compiler/rustc_query_impl/src | |
| parent | 699bfa882b34a73b333e684e96984c1c565d2eff (diff) | |
| download | rust-05886e28a4c3fbb7bc22d56bf5a52ba7cfa491d9.tar.gz rust-05886e28a4c3fbb7bc22d56bf5a52ba7cfa491d9.zip | |
Further simplify the macros generated by `rustc_queries`
- Add a new `rustc_query_names` macro. This allows a much simpler syntax for the matchers in the macros passed to it as a callback. - Convert `define_dep_nodes` and `alloc_once` to use `rustc_query_names`. This is possible because they only use the names (despite the quite complicated matchers in `define_dep_nodes`, none of the other arguments are used). - Get rid of `rustc_dep_node_append`.
Diffstat (limited to 'compiler/rustc_query_impl/src')
| -rw-r--r-- | compiler/rustc_query_impl/src/profiling_support.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_query_impl/src/profiling_support.rs b/compiler/rustc_query_impl/src/profiling_support.rs index 260af0d5408..a8e0210e8d6 100644 --- a/compiler/rustc_query_impl/src/profiling_support.rs +++ b/compiler/rustc_query_impl/src/profiling_support.rs @@ -307,7 +307,7 @@ pub fn alloc_self_profile_query_strings(tcx: TyCtxt<'_>) { macro_rules! alloc_once { ( - $($(#[$attr:meta])* [$($modifiers:tt)*] fn $name:ident($K:ty) -> $V:ty,)* + $($name:ident,)* ) => { $({ alloc_self_profile_query_strings_for_query_cache( @@ -320,5 +320,5 @@ pub fn alloc_self_profile_query_strings(tcx: TyCtxt<'_>) { } } - rustc_query_append! { alloc_once! } + rustc_query_names! { alloc_once! } } |
