@@ -293,7 +293,7 @@ macro_rules! define_callbacks {
293293 (
294294 $(
295295 $( #[ $attr: meta] ) *
296- [ $( $modifiers: tt) * ] fn $name: ident( $( $K : tt ) * ) -> $V: ty,
296+ [ $( $modifiers: tt) * ] fn $name: ident( $K : ty ) -> $V: ty,
297297 ) *
298298 ) => {
299299 $(
@@ -302,13 +302,13 @@ macro_rules! define_callbacks {
302302 use super :: * ;
303303 use $crate:: query:: erase:: { self , Erased } ;
304304
305- pub type Key <' tcx> = $( $K ) * ;
305+ pub type Key <' tcx> = $K ;
306306 pub type Value <' tcx> = $V;
307307
308308 pub type LocalKey <' tcx> = if_separate_provide_extern!(
309309 [ $( $modifiers) * ]
310- ( <$( $K ) * as $crate:: query:: AsLocalKey >:: LocalKey )
311- ( $( $K ) * )
310+ ( <$K as $crate:: query:: AsLocalKey >:: LocalKey )
311+ ( $K )
312312 ) ;
313313
314314 /// This type alias specifies the type returned from query providers and the type
@@ -349,7 +349,7 @@ macro_rules! define_callbacks {
349349 erase:: erase_val( value)
350350 }
351351
352- pub type Storage <' tcx> = <$( $K ) * as $crate:: query:: Key >:: Cache <Erased <$V>>;
352+ pub type Storage <' tcx> = <$K as $crate:: query:: Key >:: Cache <Erased <$V>>;
353353
354354 // Ensure that keys grow no larger than 88 bytes by accident.
355355 // Increase this limit if necessary, but do try to keep the size low if possible
@@ -360,7 +360,7 @@ macro_rules! define_callbacks {
360360 "the query `" ,
361361 stringify!( $name) ,
362362 "` has a key type `" ,
363- stringify!( $( $K ) * ) ,
363+ stringify!( $K ) ,
364364 "` that is too large"
365365 ) ) ;
366366 }
@@ -410,7 +410,7 @@ macro_rules! define_callbacks {
410410 #[ inline( always) ]
411411 pub fn $name(
412412 self ,
413- key: impl $crate:: query:: IntoQueryParam <$( $K ) * >,
413+ key: impl $crate:: query:: IntoQueryParam <$K >,
414414 ) -> if_return_result_from_ensure_ok!(
415415 [ $( $modifiers) * ]
416416 ( Result <( ) , ErrorGuaranteed >)
@@ -441,7 +441,7 @@ macro_rules! define_callbacks {
441441 $(
442442 $( #[ $attr] ) *
443443 #[ inline( always) ]
444- pub fn $name( self , key: impl $crate:: query:: IntoQueryParam <$( $K ) * >) {
444+ pub fn $name( self , key: impl $crate:: query:: IntoQueryParam <$K >) {
445445 crate :: query:: inner:: query_ensure(
446446 self . tcx,
447447 self . tcx. query_system. fns. engine. $name,
@@ -458,7 +458,7 @@ macro_rules! define_callbacks {
458458 $( #[ $attr] ) *
459459 #[ inline( always) ]
460460 #[ must_use]
461- pub fn $name( self , key: impl $crate:: query:: IntoQueryParam <$( $K ) * >) -> $V {
461+ pub fn $name( self , key: impl $crate:: query:: IntoQueryParam <$K >) -> $V {
462462 self . at( DUMMY_SP ) . $name( key)
463463 }
464464 ) *
@@ -468,7 +468,7 @@ macro_rules! define_callbacks {
468468 $(
469469 $( #[ $attr] ) *
470470 #[ inline( always) ]
471- pub fn $name( self , key: impl $crate:: query:: IntoQueryParam <$( $K ) * >) -> $V {
471+ pub fn $name( self , key: impl $crate:: query:: IntoQueryParam <$K >) -> $V {
472472 use $crate:: query:: { erase, inner} ;
473473
474474 erase:: restore_val:: <$V>( inner:: query_get_at(
@@ -494,7 +494,7 @@ macro_rules! define_callbacks {
494494 #[ derive( Default ) ]
495495 pub struct QueryStates <' tcx> {
496496 $(
497- pub $name: $crate:: query:: QueryState <' tcx, $( $K ) * >,
497+ pub $name: $crate:: query:: QueryState <' tcx, $K >,
498498 ) *
499499 }
500500
@@ -571,15 +571,16 @@ macro_rules! define_callbacks {
571571 } ;
572572}
573573
574+ // Note: `$V` is unused but present so this can be called by `rustc_with_all_queries`.
574575macro_rules! define_feedable {
575576 (
576577 $(
577578 $( #[ $attr: meta] ) *
578- [ $( $modifiers: tt) * ] fn $name: ident( $( $K : tt ) * ) -> $V: ty,
579+ [ $( $modifiers: tt) * ] fn $name: ident( $K : ty ) -> $V: ty,
579580 ) *
580581 ) => {
581582 $(
582- impl <' tcx, K : $crate:: query:: IntoQueryParam <$( $K ) * > + Copy > TyCtxtFeed <' tcx, K > {
583+ impl <' tcx, K : $crate:: query:: IntoQueryParam <$K > + Copy > TyCtxtFeed <' tcx, K > {
583584 $( #[ $attr] ) *
584585 #[ inline( always) ]
585586 pub fn $name( self , value: $name:: ProvidedValue <' tcx>) {
0 commit comments