- Disallow multiple macros callbacks in the same invocation. In practice, this was never used.
- Remove the `[]` brackets around the macro name
- Require an `ident`, not an arbitrary `tt`
TokenStream::from(quote! {
#[macro_export]
macro_rules! rustc_query_append {
- ([$($macro:tt)*]) => {
- $($macro)* {
+ ($macro:ident !) => {
+ $macro! {
#query_stream
}
}
}
macro_rules! rustc_dep_node_append {
- ([$($macro:tt)*][$($other:tt)*]) => {
- $($macro)*(
+ ($macro:ident! [$($other:tt)*]) => {
+ $macro!(
$($other)*
#dep_node_def_stream
}
#[macro_export]
macro_rules! rustc_cached_queries {
- ($($macro:tt)*) => {
- $($macro)*(#cached_queries);
+ ( $macro:ident! ) => {
+ $macro!(#cached_queries);
}
}
#[macro_export]
);
}
-rustc_dep_node_append!([define_dep_nodes!][
+rustc_dep_node_append!(define_dep_nodes![
// We use this for most things when incr. comp. is turned off.
[] Null,
// Queries marked with `fatal_cycle` do not need the latter implementation,
// as they will raise an fatal error on query cycles instead.
-rustc_query_append! { [define_callbacks!] }
+rustc_query_append! { define_callbacks! }
mod sealed {
use super::{DefId, LocalDefId};
}
}
-rustc_query_append! { [define_queries!] }
+rustc_query_append! { define_queries! }
impl<'tcx> Queries<'tcx> {
// Force codegen in the dyn-trait transformation in this crate.
}
}
- rustc_query_append! { [alloc_once!] }
+ rustc_query_append! { alloc_once! }
}