@@ -438,66 +438,64 @@ pub fn rustc_queries(input: TokenStream) -> TokenStream {
438
438
let mut dep_node_def_stream = quote ! { } ;
439
439
let mut cached_queries = quote ! { } ;
440
440
441
- //for group in groups.0 {
442
- for mut query in queries. 0 {
443
- let modifiers = process_modifiers ( & mut query) ;
444
- let name = & query. name ;
445
- let arg = & query. arg ;
446
- let result_full = & query. result ;
447
- let result = match query. result {
448
- ReturnType :: Default => quote ! { -> ( ) } ,
449
- _ => quote ! { #result_full } ,
450
- } ;
441
+ for mut query in queries. 0 {
442
+ let modifiers = process_modifiers ( & mut query) ;
443
+ let name = & query. name ;
444
+ let arg = & query. arg ;
445
+ let result_full = & query. result ;
446
+ let result = match query. result {
447
+ ReturnType :: Default => quote ! { -> ( ) } ,
448
+ _ => quote ! { #result_full } ,
449
+ } ;
451
450
452
- if modifiers. cache . is_some ( ) {
453
- cached_queries. extend ( quote ! {
454
- #name,
455
- } ) ;
456
- }
451
+ if modifiers. cache . is_some ( ) {
452
+ cached_queries. extend ( quote ! {
453
+ #name,
454
+ } ) ;
455
+ }
457
456
458
- let mut attributes = Vec :: new ( ) ;
457
+ let mut attributes = Vec :: new ( ) ;
459
458
460
- // Pass on the fatal_cycle modifier
461
- if modifiers. fatal_cycle {
462
- attributes. push ( quote ! { fatal_cycle } ) ;
463
- } ;
464
- // Pass on the storage modifier
465
- if let Some ( ref ty) = modifiers. storage {
466
- attributes. push ( quote ! { storage( #ty) } ) ;
467
- } ;
468
- // Pass on the cycle_delay_bug modifier
469
- if modifiers. cycle_delay_bug {
470
- attributes. push ( quote ! { cycle_delay_bug } ) ;
471
- } ;
472
- // Pass on the no_hash modifier
473
- if modifiers. no_hash {
474
- attributes. push ( quote ! { no_hash } ) ;
475
- } ;
476
- // Pass on the anon modifier
477
- if modifiers. anon {
478
- attributes. push ( quote ! { anon } ) ;
479
- } ;
480
- // Pass on the eval_always modifier
481
- if modifiers. eval_always {
482
- attributes. push ( quote ! { eval_always } ) ;
483
- } ;
459
+ // Pass on the fatal_cycle modifier
460
+ if modifiers. fatal_cycle {
461
+ attributes. push ( quote ! { fatal_cycle } ) ;
462
+ } ;
463
+ // Pass on the storage modifier
464
+ if let Some ( ref ty) = modifiers. storage {
465
+ attributes. push ( quote ! { storage( #ty) } ) ;
466
+ } ;
467
+ // Pass on the cycle_delay_bug modifier
468
+ if modifiers. cycle_delay_bug {
469
+ attributes. push ( quote ! { cycle_delay_bug } ) ;
470
+ } ;
471
+ // Pass on the no_hash modifier
472
+ if modifiers. no_hash {
473
+ attributes. push ( quote ! { no_hash } ) ;
474
+ } ;
475
+ // Pass on the anon modifier
476
+ if modifiers. anon {
477
+ attributes. push ( quote ! { anon } ) ;
478
+ } ;
479
+ // Pass on the eval_always modifier
480
+ if modifiers. eval_always {
481
+ attributes. push ( quote ! { eval_always } ) ;
482
+ } ;
484
483
485
- let attribute_stream = quote ! { #( #attributes) , * } ;
486
- let doc_comments = query. doc_comments . iter ( ) ;
487
- // Add the query to the group
488
- query_stream. extend ( quote ! {
489
- #( #doc_comments) *
490
- [ #attribute_stream] fn #name( #arg) #result,
491
- } ) ;
484
+ let attribute_stream = quote ! { #( #attributes) , * } ;
485
+ let doc_comments = query. doc_comments . iter ( ) ;
486
+ // Add the query to the group
487
+ query_stream. extend ( quote ! {
488
+ #( #doc_comments) *
489
+ [ #attribute_stream] fn #name( #arg) #result,
490
+ } ) ;
492
491
493
- // Create a dep node for the query
494
- dep_node_def_stream. extend ( quote ! {
495
- [ #attribute_stream] #name( #arg) ,
496
- } ) ;
492
+ // Create a dep node for the query
493
+ dep_node_def_stream. extend ( quote ! {
494
+ [ #attribute_stream] #name( #arg) ,
495
+ } ) ;
497
496
498
- add_query_description_impl ( & query, modifiers, & mut query_description_stream) ;
499
- }
500
- //}
497
+ add_query_description_impl ( & query, modifiers, & mut query_description_stream) ;
498
+ }
501
499
502
500
TokenStream :: from ( quote ! {
503
501
macro_rules! rustc_query_append {
0 commit comments