@@ -942,22 +942,26 @@ fn relevant_trait_impls_for((def_id, _): (DefId, SimplifiedType)) -> DepNode<Def
942
942
DepNode :: TraitImpls ( def_id)
943
943
}
944
944
945
- fn is_copy_dep_node < ' tcx > ( _: ty:: ParamEnvAnd < ' tcx , Ty < ' tcx > > ) -> DepNode < DefId > {
946
- let krate_def_id = DefId :: local ( CRATE_DEF_INDEX ) ;
947
- DepNode :: IsCopy ( krate_def_id)
945
+ fn is_copy_dep_node < ' tcx > ( key : ty:: ParamEnvAnd < ' tcx , Ty < ' tcx > > ) -> DepNode < DefId > {
946
+ let def_id = ty:: item_path:: characteristic_def_id_of_type ( key. value )
947
+ . unwrap_or ( DefId :: local ( CRATE_DEF_INDEX ) ) ;
948
+ DepNode :: IsCopy ( def_id)
948
949
}
949
950
950
- fn is_sized_dep_node < ' tcx > ( _: ty:: ParamEnvAnd < ' tcx , Ty < ' tcx > > ) -> DepNode < DefId > {
951
- let krate_def_id = DefId :: local ( CRATE_DEF_INDEX ) ;
952
- DepNode :: IsSized ( krate_def_id)
951
+ fn is_sized_dep_node < ' tcx > ( key : ty:: ParamEnvAnd < ' tcx , Ty < ' tcx > > ) -> DepNode < DefId > {
952
+ let def_id = ty:: item_path:: characteristic_def_id_of_type ( key. value )
953
+ . unwrap_or ( DefId :: local ( CRATE_DEF_INDEX ) ) ;
954
+ DepNode :: IsSized ( def_id)
953
955
}
954
956
955
- fn is_freeze_dep_node < ' tcx > ( _: ty:: ParamEnvAnd < ' tcx , Ty < ' tcx > > ) -> DepNode < DefId > {
956
- let krate_def_id = DefId :: local ( CRATE_DEF_INDEX ) ;
957
- DepNode :: IsSized ( krate_def_id)
957
+ fn is_freeze_dep_node < ' tcx > ( key : ty:: ParamEnvAnd < ' tcx , Ty < ' tcx > > ) -> DepNode < DefId > {
958
+ let def_id = ty:: item_path:: characteristic_def_id_of_type ( key. value )
959
+ . unwrap_or ( DefId :: local ( CRATE_DEF_INDEX ) ) ;
960
+ DepNode :: IsFreeze ( def_id)
958
961
}
959
962
960
- fn needs_drop_dep_node < ' tcx > ( _: ty:: ParamEnvAnd < ' tcx , Ty < ' tcx > > ) -> DepNode < DefId > {
961
- let krate_def_id = DefId :: local ( CRATE_DEF_INDEX ) ;
962
- DepNode :: NeedsDrop ( krate_def_id)
963
+ fn needs_drop_dep_node < ' tcx > ( key : ty:: ParamEnvAnd < ' tcx , Ty < ' tcx > > ) -> DepNode < DefId > {
964
+ let def_id = ty:: item_path:: characteristic_def_id_of_type ( key. value )
965
+ . unwrap_or ( DefId :: local ( CRATE_DEF_INDEX ) ) ;
966
+ DepNode :: NeedsDrop ( def_id)
963
967
}
0 commit comments