diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-04-30 10:18:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-30 10:18:29 +0200 |
| commit | ae7d78a8ff7bedef5d6dcd369456a59e74bf5477 (patch) | |
| tree | d215edb7ba7f4c4f3568ccdba81892ba11dc444b /compiler/rustc_query_impl/src | |
| parent | 89ad5743304f502830a0dec983537abe694a2f22 (diff) | |
| parent | ed2f4b6d2dd0bc5023223cf4a61c14b2b811f9cd (diff) | |
| download | rust-ae7d78a8ff7bedef5d6dcd369456a59e74bf5477.tar.gz rust-ae7d78a8ff7bedef5d6dcd369456a59e74bf5477.zip | |
Rollup merge of #140448 - Zalathar:query-append, r=compiler-errors
Rename `rustc_query_append!` to `rustc_with_all_queries!` Whenever I'm trying to make sense of the query system internals, I always get tripped up on this unhelpfully-named macro. The fact that it's a higher-order proc macro is already mind-melting enough on its own. This new name, `rustc_with_all_queries!`, forms a much more intuitive combination with the helper macros that it invokes. And only one of the call sites was even making use of the “append” part of its old name. This PR also reformats the parameters matched by the helper macros, to make the actual argument syntax a bit easier to see. --- Renaming and reformatting only; no functional changes.
Diffstat (limited to 'compiler/rustc_query_impl/src')
| -rw-r--r-- | compiler/rustc_query_impl/src/lib.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_query_impl/src/plumbing.rs | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/compiler/rustc_query_impl/src/lib.rs b/compiler/rustc_query_impl/src/lib.rs index 3c329dd0a0e..b7d8af2c995 100644 --- a/compiler/rustc_query_impl/src/lib.rs +++ b/compiler/rustc_query_impl/src/lib.rs @@ -234,7 +234,7 @@ pub fn query_system<'a>( } } -rustc_middle::rustc_query_append! { define_queries! } +rustc_middle::rustc_with_all_queries! { define_queries! } pub fn provide(providers: &mut rustc_middle::util::Providers) { providers.hooks.alloc_self_profile_query_strings = alloc_self_profile_query_strings; diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index 19ccc5587d6..d11fa8bad9b 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -575,11 +575,14 @@ where } // NOTE: `$V` isn't used here, but we still need to match on it so it can be passed to other macros -// invoked by `rustc_query_append`. +// invoked by `rustc_with_all_queries`. macro_rules! define_queries { ( - $($(#[$attr:meta])* - [$($modifiers:tt)*] fn $name:ident($($K:tt)*) -> $V:ty,)*) => { + $( + $(#[$attr:meta])* + [$($modifiers:tt)*] fn $name:ident($($K:tt)*) -> $V:ty, + )* + ) => { pub(crate) mod query_impl { $(pub(crate) mod $name { use super::super::*; |
