@@ -430,11 +430,6 @@ macro_rules! hash_result {
430
430
} ;
431
431
}
432
432
433
- macro_rules! query_helper_param_ty {
434
- ( DefId ) => { impl IntoQueryParam <DefId > } ;
435
- ( $K: ty) => { $K } ;
436
- }
437
-
438
433
macro_rules! define_queries {
439
434
( <$tcx: tt>
440
435
$( $( #[ $attr: meta] ) *
@@ -512,42 +507,6 @@ macro_rules! define_queries {
512
507
} ) *
513
508
}
514
509
515
- // HACK(eddyb) this is like the `impl QueryConfig for queries::$name`
516
- // below, but using type aliases instead of associated types, to bypass
517
- // the limitations around normalizing under HRTB - for example, this:
518
- // `for<'tcx> fn(...) -> <queries::$name<'tcx> as QueryConfig<TyCtxt<'tcx>>>::Value`
519
- // doesn't currently normalize to `for<'tcx> fn(...) -> query_values::$name<'tcx>`.
520
- // This is primarily used by the `provide!` macro in `rustc_metadata`.
521
- #[ allow( nonstandard_style, unused_lifetimes) ]
522
- pub mod query_keys {
523
- use super :: * ;
524
-
525
- $( pub type $name<$tcx> = $( $K) * ; ) *
526
- }
527
- #[ allow( nonstandard_style, unused_lifetimes) ]
528
- pub mod query_values {
529
- use super :: * ;
530
-
531
- $( pub type $name<$tcx> = $V; ) *
532
- }
533
- #[ allow( nonstandard_style, unused_lifetimes) ]
534
- pub mod query_storage {
535
- use super :: * ;
536
-
537
- $( pub type $name<$tcx> = query_storage!( [ $( $modifiers) * ] [ $( $K) * , $V] ) ; ) *
538
- }
539
- #[ allow( nonstandard_style, unused_lifetimes) ]
540
- pub mod query_stored {
541
- use super :: * ;
542
-
543
- $( pub type $name<$tcx> = <query_storage:: $name<$tcx> as QueryStorage >:: Stored ; ) *
544
- }
545
-
546
- #[ derive( Default ) ]
547
- pub struct QueryCaches <$tcx> {
548
- $( $( #[ $attr] ) * $name: QueryCacheStore <query_storage:: $name<$tcx>>, ) *
549
- }
550
-
551
510
$( impl <$tcx> QueryConfig for queries:: $name<$tcx> {
552
511
type Key = $( $K) * ;
553
512
type Value = $V;
@@ -683,11 +642,6 @@ macro_rules! define_queries {
683
642
}
684
643
685
644
static QUERY_CALLBACKS : & [ QueryStruct ] = & make_dep_kind_array!( query_callbacks) ;
686
-
687
- define_provider_struct! {
688
- tcx: $tcx,
689
- input: ( $( ( [ $( $modifiers) * ] [ $name] [ $( $K) * ] [ $V] ) ) * )
690
- }
691
645
}
692
646
}
693
647
@@ -774,30 +728,6 @@ macro_rules! define_queries_struct {
774
728
} ;
775
729
}
776
730
777
- macro_rules! define_provider_struct {
778
- ( tcx: $tcx: tt,
779
- input: ( $( ( [ $( $modifiers: tt) * ] [ $name: ident] [ $K: ty] [ $R: ty] ) ) * ) ) => {
780
- pub struct Providers {
781
- $( pub $name: for <$tcx> fn ( TyCtxt <$tcx>, $K) -> $R, ) *
782
- }
783
-
784
- impl Default for Providers {
785
- fn default ( ) -> Self {
786
- $( fn $name<$tcx>( _: TyCtxt <$tcx>, key: $K) -> $R {
787
- bug!( "`tcx.{}({:?})` unsupported by its crate" ,
788
- stringify!( $name) , key) ;
789
- } ) *
790
- Providers { $( $name) ,* }
791
- }
792
- }
793
-
794
- impl Copy for Providers { }
795
- impl Clone for Providers {
796
- fn clone( & self ) -> Self { * self }
797
- }
798
- } ;
799
- }
800
-
801
731
fn describe_as_module ( def_id : LocalDefId , tcx : TyCtxt < ' _ > ) -> String {
802
732
if def_id. is_top_level_module ( ) {
803
733
"top-level module" . to_string ( )
0 commit comments