9
9
// except according to those terms.
10
10
11
11
use dep_graph:: { DepConstructor , DepNode , DepNodeIndex } ;
12
- use hir:: def_id:: { CrateNum , CRATE_DEF_INDEX , DefId , LOCAL_CRATE } ;
12
+ use hir:: def_id:: { CrateNum , DefId , LOCAL_CRATE } ;
13
13
use hir:: def:: Def ;
14
14
use hir;
15
15
use middle:: const_val;
@@ -1036,10 +1036,9 @@ fn typeck_item_bodies_dep_node<'tcx>(_: CrateNum) -> DepConstructor<'tcx> {
1036
1036
DepConstructor :: TypeckBodiesKrate
1037
1037
}
1038
1038
1039
- fn const_eval_dep_node < ' tcx > ( key : ty:: ParamEnvAnd < ' tcx , ( DefId , & ' tcx Substs < ' tcx > ) > )
1039
+ fn const_eval_dep_node < ' tcx > ( _ : ty:: ParamEnvAnd < ' tcx , ( DefId , & ' tcx Substs < ' tcx > ) > )
1040
1040
-> DepConstructor < ' tcx > {
1041
- let ( def_id, substs) = key. value ;
1042
- DepConstructor :: ConstEval { def_id, substs }
1041
+ DepConstructor :: ConstEval
1043
1042
}
1044
1043
1045
1044
fn mir_keys < ' tcx > ( _: CrateNum ) -> DepConstructor < ' tcx > {
@@ -1054,32 +1053,22 @@ fn relevant_trait_impls_for<'tcx>((def_id, t): (DefId, SimplifiedType)) -> DepCo
1054
1053
DepConstructor :: RelevantTraitImpls ( def_id, t)
1055
1054
}
1056
1055
1057
- fn is_copy_dep_node < ' tcx > ( key : ty:: ParamEnvAnd < ' tcx , Ty < ' tcx > > ) -> DepConstructor < ' tcx > {
1058
- let def_id = ty:: item_path:: characteristic_def_id_of_type ( key. value )
1059
- . unwrap_or ( DefId :: local ( CRATE_DEF_INDEX ) ) ;
1060
- DepConstructor :: IsCopy ( def_id)
1056
+ fn is_copy_dep_node < ' tcx > ( _: ty:: ParamEnvAnd < ' tcx , Ty < ' tcx > > ) -> DepConstructor < ' tcx > {
1057
+ DepConstructor :: IsCopy
1061
1058
}
1062
1059
1063
- fn is_sized_dep_node < ' tcx > ( key : ty:: ParamEnvAnd < ' tcx , Ty < ' tcx > > ) -> DepConstructor < ' tcx > {
1064
- let def_id = ty:: item_path:: characteristic_def_id_of_type ( key. value )
1065
- . unwrap_or ( DefId :: local ( CRATE_DEF_INDEX ) ) ;
1066
- DepConstructor :: IsSized ( def_id)
1060
+ fn is_sized_dep_node < ' tcx > ( _: ty:: ParamEnvAnd < ' tcx , Ty < ' tcx > > ) -> DepConstructor < ' tcx > {
1061
+ DepConstructor :: IsSized
1067
1062
}
1068
1063
1069
- fn is_freeze_dep_node < ' tcx > ( key : ty:: ParamEnvAnd < ' tcx , Ty < ' tcx > > ) -> DepConstructor < ' tcx > {
1070
- let def_id = ty:: item_path:: characteristic_def_id_of_type ( key. value )
1071
- . unwrap_or ( DefId :: local ( CRATE_DEF_INDEX ) ) ;
1072
- DepConstructor :: IsFreeze ( def_id)
1064
+ fn is_freeze_dep_node < ' tcx > ( _: ty:: ParamEnvAnd < ' tcx , Ty < ' tcx > > ) -> DepConstructor < ' tcx > {
1065
+ DepConstructor :: IsFreeze
1073
1066
}
1074
1067
1075
- fn needs_drop_dep_node < ' tcx > ( key : ty:: ParamEnvAnd < ' tcx , Ty < ' tcx > > ) -> DepConstructor < ' tcx > {
1076
- let def_id = ty:: item_path:: characteristic_def_id_of_type ( key. value )
1077
- . unwrap_or ( DefId :: local ( CRATE_DEF_INDEX ) ) ;
1078
- DepConstructor :: NeedsDrop ( def_id)
1068
+ fn needs_drop_dep_node < ' tcx > ( _: ty:: ParamEnvAnd < ' tcx , Ty < ' tcx > > ) -> DepConstructor < ' tcx > {
1069
+ DepConstructor :: NeedsDrop
1079
1070
}
1080
1071
1081
- fn layout_dep_node < ' tcx > ( key : ty:: ParamEnvAnd < ' tcx , Ty < ' tcx > > ) -> DepConstructor < ' tcx > {
1082
- let def_id = ty:: item_path:: characteristic_def_id_of_type ( key. value )
1083
- . unwrap_or ( DefId :: local ( CRATE_DEF_INDEX ) ) ;
1084
- DepConstructor :: Layout ( def_id)
1072
+ fn layout_dep_node < ' tcx > ( _: ty:: ParamEnvAnd < ' tcx , Ty < ' tcx > > ) -> DepConstructor < ' tcx > {
1073
+ DepConstructor :: Layout
1085
1074
}
0 commit comments