@@ -204,7 +204,7 @@ macro_rules! define_dep_nodes {
204
204
impl DepNode {
205
205
#[ allow( unreachable_code, non_snake_case) ]
206
206
#[ inline( always) ]
207
- pub fn new<' a, ' gcx, ' tcx>( tcx: TyCtxt <' a , ' gcx, ' tcx>,
207
+ pub fn new<' a, ' gcx, ' tcx>( tcx: TyCtxt <' gcx, ' tcx>,
208
208
dep: DepConstructor <' gcx>)
209
209
-> DepNode
210
210
where ' gcx: ' a + ' tcx,
@@ -307,7 +307,7 @@ macro_rules! define_dep_nodes {
307
307
/// refers to something from the previous compilation session that
308
308
/// has been removed.
309
309
#[ inline]
310
- pub fn extract_def_id( & self , tcx: TyCtxt <' _, ' _, ' _ >) -> Option <DefId > {
310
+ pub fn extract_def_id( & self , tcx: TyCtxt <' _, ' _>) -> Option <DefId > {
311
311
if self . kind. can_reconstruct_query_key( ) {
312
312
let def_path_hash = DefPathHash ( self . hash) ;
313
313
tcx. def_path_hash_to_def_id. as_ref( ) ?
@@ -400,7 +400,7 @@ impl DefPathHash {
400
400
401
401
impl DefId {
402
402
#[ inline( always) ]
403
- pub fn to_dep_node ( self , tcx : TyCtxt < ' _ , ' _ , ' _ > , kind : DepKind ) -> DepNode {
403
+ pub fn to_dep_node ( self , tcx : TyCtxt < ' _ , ' _ > , kind : DepKind ) -> DepNode {
404
404
DepNode :: from_def_path_hash ( kind, tcx. def_path_hash ( self ) )
405
405
}
406
406
}
@@ -442,49 +442,50 @@ rustc_dep_node_append!([define_dep_nodes!][ <'tcx>
442
442
] ) ;
443
443
444
444
pub trait RecoverKey < ' tcx > : Sized {
445
- fn recover ( tcx : TyCtxt < ' _ , ' tcx , ' tcx > , dep_node : & DepNode ) -> Option < Self > ;
445
+ fn recover ( tcx : TyCtxt < ' tcx , ' tcx > , dep_node : & DepNode ) -> Option < Self > ;
446
446
}
447
447
448
448
impl RecoverKey < ' tcx > for CrateNum {
449
- fn recover ( tcx : TyCtxt < ' _ , ' tcx , ' tcx > , dep_node : & DepNode ) -> Option < Self > {
449
+ fn recover ( tcx : TyCtxt < ' tcx , ' tcx > , dep_node : & DepNode ) -> Option < Self > {
450
450
dep_node. extract_def_id ( tcx) . map ( |id| id. krate )
451
451
}
452
452
}
453
453
454
454
impl RecoverKey < ' tcx > for DefId {
455
- fn recover ( tcx : TyCtxt < ' _ , ' tcx , ' tcx > , dep_node : & DepNode ) -> Option < Self > {
455
+ fn recover ( tcx : TyCtxt < ' tcx , ' tcx > , dep_node : & DepNode ) -> Option < Self > {
456
456
dep_node. extract_def_id ( tcx)
457
457
}
458
458
}
459
459
460
460
impl RecoverKey < ' tcx > for DefIndex {
461
- fn recover ( tcx : TyCtxt < ' _ , ' tcx , ' tcx > , dep_node : & DepNode ) -> Option < Self > {
461
+ fn recover ( tcx : TyCtxt < ' tcx , ' tcx > , dep_node : & DepNode ) -> Option < Self > {
462
462
dep_node. extract_def_id ( tcx) . map ( |id| id. index )
463
463
}
464
464
}
465
465
466
- trait DepNodeParams < ' a , ' gcx : ' tcx + ' a , ' tcx : ' a > : fmt:: Debug {
466
+ trait DepNodeParams < ' gcx : ' tcx , ' tcx > : fmt:: Debug {
467
467
const CAN_RECONSTRUCT_QUERY_KEY : bool ;
468
468
469
469
/// This method turns the parameters of a DepNodeConstructor into an opaque
470
470
/// Fingerprint to be used in DepNode.
471
471
/// Not all DepNodeParams support being turned into a Fingerprint (they
472
472
/// don't need to if the corresponding DepNode is anonymous).
473
- fn to_fingerprint ( & self , _: TyCtxt < ' a , ' gcx , ' tcx > ) -> Fingerprint {
473
+ fn to_fingerprint ( & self , _: TyCtxt < ' gcx , ' tcx > ) -> Fingerprint {
474
474
panic ! ( "Not implemented. Accidentally called on anonymous node?" )
475
475
}
476
476
477
- fn to_debug_str ( & self , _: TyCtxt < ' a , ' gcx , ' tcx > ) -> String {
477
+ fn to_debug_str ( & self , _: TyCtxt < ' gcx , ' tcx > ) -> String {
478
478
format ! ( "{:?}" , self )
479
479
}
480
480
}
481
481
482
- impl < ' a , ' gcx : ' tcx + ' a , ' tcx : ' a , T > DepNodeParams < ' a , ' gcx , ' tcx > for T
483
- where T : HashStable < StableHashingContext < ' a > > + fmt:: Debug
482
+ impl < ' gcx : ' tcx , ' tcx , T > DepNodeParams < ' gcx , ' tcx > for T
483
+ where
484
+ T : HashStable < StableHashingContext < ' tcx > > + fmt:: Debug ,
484
485
{
485
486
default const CAN_RECONSTRUCT_QUERY_KEY : bool = false;
486
487
487
- default fn to_fingerprint ( & self , tcx : TyCtxt < ' a , ' gcx , ' tcx > ) -> Fingerprint {
488
+ default fn to_fingerprint ( & self , tcx : TyCtxt < ' gcx , ' tcx > ) -> Fingerprint {
488
489
let mut hcx = tcx. create_stable_hashing_context ( ) ;
489
490
let mut hasher = StableHasher :: new ( ) ;
490
491
@@ -493,58 +494,58 @@ impl<'a, 'gcx: 'tcx + 'a, 'tcx: 'a, T> DepNodeParams<'a, 'gcx, 'tcx> for T
493
494
hasher. finish ( )
494
495
}
495
496
496
- default fn to_debug_str ( & self , _: TyCtxt < ' a , ' gcx , ' tcx > ) -> String {
497
+ default fn to_debug_str ( & self , _: TyCtxt < ' gcx , ' tcx > ) -> String {
497
498
format ! ( "{:?}" , * self )
498
499
}
499
500
}
500
501
501
- impl < ' a , ' gcx : ' tcx + ' a , ' tcx : ' a > DepNodeParams < ' a , ' gcx , ' tcx > for DefId {
502
+ impl < ' gcx : ' tcx , ' tcx > DepNodeParams < ' gcx , ' tcx > for DefId {
502
503
const CAN_RECONSTRUCT_QUERY_KEY : bool = true ;
503
504
504
- fn to_fingerprint ( & self , tcx : TyCtxt < ' _ , ' _ , ' _ > ) -> Fingerprint {
505
+ fn to_fingerprint ( & self , tcx : TyCtxt < ' _ , ' _ > ) -> Fingerprint {
505
506
tcx. def_path_hash ( * self ) . 0
506
507
}
507
508
508
- fn to_debug_str ( & self , tcx : TyCtxt < ' a , ' gcx , ' tcx > ) -> String {
509
+ fn to_debug_str ( & self , tcx : TyCtxt < ' gcx , ' tcx > ) -> String {
509
510
tcx. def_path_str ( * self )
510
511
}
511
512
}
512
513
513
- impl < ' a , ' gcx : ' tcx + ' a , ' tcx : ' a > DepNodeParams < ' a , ' gcx , ' tcx > for DefIndex {
514
+ impl < ' gcx : ' tcx , ' tcx > DepNodeParams < ' gcx , ' tcx > for DefIndex {
514
515
const CAN_RECONSTRUCT_QUERY_KEY : bool = true ;
515
516
516
- fn to_fingerprint ( & self , tcx : TyCtxt < ' _ , ' _ , ' _ > ) -> Fingerprint {
517
+ fn to_fingerprint ( & self , tcx : TyCtxt < ' _ , ' _ > ) -> Fingerprint {
517
518
tcx. hir ( ) . definitions ( ) . def_path_hash ( * self ) . 0
518
519
}
519
520
520
- fn to_debug_str ( & self , tcx : TyCtxt < ' a , ' gcx , ' tcx > ) -> String {
521
+ fn to_debug_str ( & self , tcx : TyCtxt < ' gcx , ' tcx > ) -> String {
521
522
tcx. def_path_str ( DefId :: local ( * self ) )
522
523
}
523
524
}
524
525
525
- impl < ' a , ' gcx : ' tcx + ' a , ' tcx : ' a > DepNodeParams < ' a , ' gcx , ' tcx > for CrateNum {
526
+ impl < ' gcx : ' tcx , ' tcx > DepNodeParams < ' gcx , ' tcx > for CrateNum {
526
527
const CAN_RECONSTRUCT_QUERY_KEY : bool = true ;
527
528
528
- fn to_fingerprint ( & self , tcx : TyCtxt < ' _ , ' _ , ' _ > ) -> Fingerprint {
529
+ fn to_fingerprint ( & self , tcx : TyCtxt < ' _ , ' _ > ) -> Fingerprint {
529
530
let def_id = DefId {
530
531
krate : * self ,
531
532
index : CRATE_DEF_INDEX ,
532
533
} ;
533
534
tcx. def_path_hash ( def_id) . 0
534
535
}
535
536
536
- fn to_debug_str ( & self , tcx : TyCtxt < ' a , ' gcx , ' tcx > ) -> String {
537
+ fn to_debug_str ( & self , tcx : TyCtxt < ' gcx , ' tcx > ) -> String {
537
538
tcx. crate_name ( * self ) . as_str ( ) . to_string ( )
538
539
}
539
540
}
540
541
541
- impl < ' a , ' gcx : ' tcx + ' a , ' tcx : ' a > DepNodeParams < ' a , ' gcx , ' tcx > for ( DefId , DefId ) {
542
+ impl < ' gcx : ' tcx , ' tcx > DepNodeParams < ' gcx , ' tcx > for ( DefId , DefId ) {
542
543
const CAN_RECONSTRUCT_QUERY_KEY : bool = false ;
543
544
544
545
// We actually would not need to specialize the implementation of this
545
546
// method but it's faster to combine the hashes than to instantiate a full
546
547
// hashing context and stable-hashing state.
547
- fn to_fingerprint ( & self , tcx : TyCtxt < ' _ , ' _ , ' _ > ) -> Fingerprint {
548
+ fn to_fingerprint ( & self , tcx : TyCtxt < ' _ , ' _ > ) -> Fingerprint {
548
549
let ( def_id_0, def_id_1) = * self ;
549
550
550
551
let def_path_hash_0 = tcx. def_path_hash ( def_id_0) ;
@@ -553,7 +554,7 @@ impl<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> DepNodeParams<'a, 'gcx, 'tcx> for (DefId, De
553
554
def_path_hash_0. 0 . combine ( def_path_hash_1. 0 )
554
555
}
555
556
556
- fn to_debug_str ( & self , tcx : TyCtxt < ' a , ' gcx , ' tcx > ) -> String {
557
+ fn to_debug_str ( & self , tcx : TyCtxt < ' gcx , ' tcx > ) -> String {
557
558
let ( def_id_0, def_id_1) = * self ;
558
559
559
560
format ! ( "({}, {})" ,
@@ -562,13 +563,13 @@ impl<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> DepNodeParams<'a, 'gcx, 'tcx> for (DefId, De
562
563
}
563
564
}
564
565
565
- impl < ' a , ' gcx : ' tcx + ' a , ' tcx : ' a > DepNodeParams < ' a , ' gcx , ' tcx > for HirId {
566
+ impl < ' gcx : ' tcx , ' tcx > DepNodeParams < ' gcx , ' tcx > for HirId {
566
567
const CAN_RECONSTRUCT_QUERY_KEY : bool = false ;
567
568
568
569
// We actually would not need to specialize the implementation of this
569
570
// method but it's faster to combine the hashes than to instantiate a full
570
571
// hashing context and stable-hashing state.
571
- fn to_fingerprint ( & self , tcx : TyCtxt < ' _ , ' _ , ' _ > ) -> Fingerprint {
572
+ fn to_fingerprint ( & self , tcx : TyCtxt < ' _ , ' _ > ) -> Fingerprint {
572
573
let HirId {
573
574
owner,
574
575
local_id,
0 commit comments