@@ -65,7 +65,8 @@ use hir::map::DefPathHash;
6565use hir:: { HirId , ItemLocalId } ;
6666
6767use ich:: Fingerprint ;
68- use ty:: { TyCtxt , Instance , InstanceDef } ;
68+ use ty:: { TyCtxt , Instance , InstanceDef , ParamEnvAnd , Ty } ;
69+ use ty:: subst:: Substs ;
6970use rustc_data_structures:: stable_hasher:: { StableHasher , HashStable } ;
7071use ich:: StableHashingContext ;
7172use std:: fmt;
@@ -480,17 +481,17 @@ define_dep_nodes!( <'tcx>
480481 [ ] TypeckBodiesKrate ,
481482 [ ] TypeckTables ( DefId ) ,
482483 [ ] HasTypeckTables ( DefId ) ,
483- [ anon ] ConstEval ,
484+ [ ] ConstEval { param_env : ParamEnvAnd < ' tcx , ( DefId , & ' tcx Substs < ' tcx> ) > } ,
484485 [ ] SymbolName ( DefId ) ,
485486 [ ] InstanceSymbolName { instance: Instance <' tcx> } ,
486487 [ ] SpecializationGraph ( DefId ) ,
487488 [ ] ObjectSafety ( DefId ) ,
488489
489- [ anon ] IsCopy ,
490- [ anon ] IsSized ,
491- [ anon ] IsFreeze ,
492- [ anon ] NeedsDrop ,
493- [ anon ] Layout ,
490+ [ ] IsCopy { param_env : ParamEnvAnd < ' tcx , Ty < ' tcx>> } ,
491+ [ ] IsSized { param_env : ParamEnvAnd < ' tcx , Ty < ' tcx>> } ,
492+ [ ] IsFreeze { param_env : ParamEnvAnd < ' tcx , Ty < ' tcx>> } ,
493+ [ ] NeedsDrop { param_env : ParamEnvAnd < ' tcx , Ty < ' tcx>> } ,
494+ [ ] Layout { param_env : ParamEnvAnd < ' tcx , Ty < ' tcx>> } ,
494495
495496 // The set of impls for a given trait.
496497 [ ] TraitImpls ( DefId ) ,
@@ -524,10 +525,6 @@ define_dep_nodes!( <'tcx>
524525 // trait-select node.
525526 [ anon] TraitSelect ,
526527
527- // For proj. cache, we just keep a list of all def-ids, since it is
528- // not a hotspot.
529- [ ] ProjectionCache { def_ids: DefIdList } ,
530-
531528 [ ] ParamEnv ( DefId ) ,
532529 [ ] DescribeDef ( DefId ) ,
533530 [ ] DefSpan ( DefId ) ,
@@ -708,40 +705,6 @@ impl<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> DepNodeParams<'a, 'gcx, 'tcx> for (DefId, De
708705 }
709706}
710707
711-
712- impl < ' a , ' gcx : ' tcx + ' a , ' tcx : ' a > DepNodeParams < ' a , ' gcx , ' tcx > for ( DefIdList , ) {
713- const CAN_RECONSTRUCT_QUERY_KEY : bool = false ;
714-
715- // We actually would not need to specialize the implementation of this
716- // method but it's faster to combine the hashes than to instantiate a full
717- // hashing context and stable-hashing state.
718- fn to_fingerprint ( & self , tcx : TyCtxt ) -> Fingerprint {
719- let mut fingerprint = Fingerprint :: zero ( ) ;
720-
721- for & def_id in self . 0 . iter ( ) {
722- let def_path_hash = tcx. def_path_hash ( def_id) ;
723- fingerprint = fingerprint. combine ( def_path_hash. 0 ) ;
724- }
725-
726- fingerprint
727- }
728-
729- fn to_debug_str ( & self , tcx : TyCtxt < ' a , ' gcx , ' tcx > ) -> String {
730- use std:: fmt:: Write ;
731-
732- let mut s = String :: new ( ) ;
733- write ! ( & mut s, "[" ) . unwrap ( ) ;
734-
735- for & def_id in self . 0 . iter ( ) {
736- write ! ( & mut s, "{}" , tcx. def_path( def_id) . to_string( tcx) ) . unwrap ( ) ;
737- }
738-
739- write ! ( & mut s, "]" ) . unwrap ( ) ;
740-
741- s
742- }
743- }
744-
745708impl < ' a , ' gcx : ' tcx + ' a , ' tcx : ' a > DepNodeParams < ' a , ' gcx , ' tcx > for ( HirId , ) {
746709 const CAN_RECONSTRUCT_QUERY_KEY : bool = false ;
747710
@@ -800,4 +763,3 @@ impl_stable_hash_for!(struct ::dep_graph::WorkProductId {
800763 hash
801764} ) ;
802765
803- type DefIdList = Vec < DefId > ;
0 commit comments