@@ -510,21 +510,21 @@ macro_rules! define_callbacks {
510510 /// Identifies a query by kind and key. This is in contrast to `QueryId` which is just a number.
511511 #[ allow( non_camel_case_types) ]
512512 #[ derive( Clone , Debug ) ]
513- pub enum QueryKeyId <' tcx> {
513+ pub enum TaggedQueryKey <' tcx> {
514514 $(
515515 $name( $name:: Key <' tcx>) ,
516516 ) *
517517 }
518518
519- impl <' tcx> QueryKeyId <' tcx> {
519+ impl <' tcx> TaggedQueryKey <' tcx> {
520520 /// Formats a human-readable description of this query and its key, as
521521 /// specified by the `desc` query modifier.
522522 ///
523523 /// Used when reporting query cycle errors and similar problems.
524524 pub fn description( & self , tcx: TyCtxt <' tcx>) -> String {
525525 let ( name, description) = ty:: print:: with_no_queries!( match self {
526526 $(
527- QueryKeyId :: $name( key) => ( stringify!( $name) , _description_fns:: $name( tcx, * key) ) ,
527+ TaggedQueryKey :: $name( key) => ( stringify!( $name) , _description_fns:: $name( tcx, * key) ) ,
528528 ) *
529529 } ) ;
530530 if tcx. sess. verbose_internals( ) {
@@ -539,14 +539,14 @@ macro_rules! define_callbacks {
539539 if !span. is_dummy( ) {
540540 return span
541541 }
542- if let QueryKeyId :: def_span( ..) = self {
542+ if let TaggedQueryKey :: def_span( ..) = self {
543543 // The `def_span` query is used to calculate `default_span`,
544544 // so exit to avoid infinite recursion.
545545 return DUMMY_SP
546546 }
547547 match self {
548548 $(
549- QueryKeyId :: $name( key) => crate :: query:: QueryKey :: default_span( key, tcx) ,
549+ TaggedQueryKey :: $name( key) => crate :: query:: QueryKey :: default_span( key, tcx) ,
550550 ) *
551551 }
552552 }
@@ -556,13 +556,13 @@ macro_rules! define_callbacks {
556556 key. key_as_def_id( ) . and_then( |def_id| def_id. as_local( ) ) . map( |def_id| tcx. def_kind( def_id) )
557557 }
558558
559- if let QueryKeyId :: def_kind( ..) = self {
559+ if let TaggedQueryKey :: def_kind( ..) = self {
560560 // Try to avoid infinite recursion.
561561 return None
562562 }
563563 match self {
564564 $(
565- QueryKeyId :: $name( key) => inner( key, tcx) ,
565+ TaggedQueryKey :: $name( key) => inner( key, tcx) ,
566566 ) *
567567 }
568568 }
0 commit comments