@@ -265,13 +265,13 @@ fn add_query_description_impl(query: &Query, impls: &mut proc_macro2::TokenStrea
265
265
let try_load_from_disk = if let Some ( ( tcx, id, block) ) = modifiers. load_cached . as_ref ( ) {
266
266
// Use custom code to load the query from disk
267
267
quote ! {
268
- const TRY_LOAD_FROM_DISK : Option <fn ( QueryCtxt <$ tcx>, SerializedDepNodeIndex ) -> Option <Self :: Value >>
268
+ const TRY_LOAD_FROM_DISK : Option <fn ( QueryCtxt <' tcx>, SerializedDepNodeIndex ) -> Option <Self :: Value >>
269
269
= Some ( |#tcx, #id| { #block } ) ;
270
270
}
271
271
} else {
272
272
// Use the default code to load the query from disk
273
273
quote ! {
274
- const TRY_LOAD_FROM_DISK : Option <fn ( QueryCtxt <$ tcx>, SerializedDepNodeIndex ) -> Option <Self :: Value >>
274
+ const TRY_LOAD_FROM_DISK : Option <fn ( QueryCtxt <' tcx>, SerializedDepNodeIndex ) -> Option <Self :: Value >>
275
275
= Some ( |tcx, id| tcx. on_disk_cache( ) . as_ref( ) ?. try_load_query_result( * tcx, id) ) ;
276
276
}
277
277
} ;
@@ -298,7 +298,7 @@ fn add_query_description_impl(query: &Query, impls: &mut proc_macro2::TokenStrea
298
298
false
299
299
}
300
300
301
- const TRY_LOAD_FROM_DISK : Option <fn ( QueryCtxt <$ tcx>, SerializedDepNodeIndex ) -> Option <Self :: Value >> = None ;
301
+ const TRY_LOAD_FROM_DISK : Option <fn ( QueryCtxt <' tcx>, SerializedDepNodeIndex ) -> Option <Self :: Value >> = None ;
302
302
}
303
303
} ;
304
304
@@ -307,7 +307,7 @@ fn add_query_description_impl(query: &Query, impls: &mut proc_macro2::TokenStrea
307
307
308
308
let desc = quote ! {
309
309
#[ allow( unused_variables) ]
310
- fn describe( tcx: QueryCtxt <$ tcx>, key: Self :: Key ) -> String {
310
+ fn describe( tcx: QueryCtxt <' tcx>, key: Self :: Key ) -> String {
311
311
let ( #tcx, #key) = ( * tcx, key) ;
312
312
:: rustc_middle:: ty:: print:: with_no_trimmed_paths!(
313
313
format!( #desc)
@@ -316,7 +316,7 @@ fn add_query_description_impl(query: &Query, impls: &mut proc_macro2::TokenStrea
316
316
} ;
317
317
318
318
impls. extend ( quote ! {
319
- ( #name<$tcx : tt> ) => {
319
+ ( #name) => {
320
320
#desc
321
321
#cache
322
322
} ;
@@ -411,15 +411,15 @@ pub fn rustc_queries(input: TokenStream) -> TokenStream {
411
411
TokenStream :: from ( quote ! {
412
412
#[ macro_export]
413
413
macro_rules! rustc_query_append {
414
- ( [ $ ( $ macro: tt ) * ] ) => {
415
- $( $ macro) * {
414
+ ( $ macro: ident ! ) => {
415
+ $macro! {
416
416
#query_stream
417
417
}
418
418
}
419
419
}
420
420
macro_rules! rustc_dep_node_append {
421
- ( [ $ ( $ macro: tt ) * ] [ $( $other: tt) * ] ) => {
422
- $( $ macro) * (
421
+ ( $ macro: ident! [ $( $other: tt) * ] ) => {
422
+ $macro! (
423
423
$( $other) *
424
424
425
425
#dep_node_def_stream
@@ -428,8 +428,8 @@ pub fn rustc_queries(input: TokenStream) -> TokenStream {
428
428
}
429
429
#[ macro_export]
430
430
macro_rules! rustc_cached_queries {
431
- ( $ ( $ macro: tt ) * ) => {
432
- $( $ macro) * ( #cached_queries) ;
431
+ ( $ macro: ident! ) => {
432
+ $macro! ( #cached_queries) ;
433
433
}
434
434
}
435
435
#[ macro_export]
0 commit comments