@@ -1046,11 +1046,11 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
1046
1046
1047
1047
let tcx = self . tcx ( ) ;
1048
1048
if self . can_use_global_caches ( param_env) {
1049
- if let Some ( res) = tcx. evaluation_cache . get ( & param_env . and ( trait_pred) , tcx) {
1049
+ if let Some ( res) = tcx. evaluation_cache . get ( & ( param_env , trait_pred) , tcx) {
1050
1050
return Some ( res) ;
1051
1051
}
1052
1052
}
1053
- self . infcx . evaluation_cache . get ( & param_env . and ( trait_pred) , tcx)
1053
+ self . infcx . evaluation_cache . get ( & ( param_env , trait_pred) , tcx)
1054
1054
}
1055
1055
1056
1056
fn insert_evaluation_cache (
@@ -1081,13 +1081,13 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
1081
1081
// FIXME: Due to #50507 this overwrites the different values
1082
1082
// This should be changed to use HashMapExt::insert_same
1083
1083
// when that is fixed
1084
- self . tcx ( ) . evaluation_cache . insert ( param_env . and ( trait_pred) , dep_node, result) ;
1084
+ self . tcx ( ) . evaluation_cache . insert ( ( param_env , trait_pred) , dep_node, result) ;
1085
1085
return ;
1086
1086
}
1087
1087
}
1088
1088
1089
1089
debug ! ( ?trait_pred, ?result, "insert_evaluation_cache" ) ;
1090
- self . infcx . evaluation_cache . insert ( param_env . and ( trait_pred) , dep_node, result) ;
1090
+ self . infcx . evaluation_cache . insert ( ( param_env , trait_pred) , dep_node, result) ;
1091
1091
}
1092
1092
1093
1093
/// For various reasons, it's possible for a subobligation
@@ -1297,11 +1297,11 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
1297
1297
pred. remap_constness ( tcx, & mut param_env) ;
1298
1298
1299
1299
if self . can_use_global_caches ( param_env) {
1300
- if let Some ( res) = tcx. selection_cache . get ( & param_env . and ( pred) , tcx) {
1300
+ if let Some ( res) = tcx. selection_cache . get ( & ( param_env , pred) , tcx) {
1301
1301
return Some ( res) ;
1302
1302
}
1303
1303
}
1304
- self . infcx . selection_cache . get ( & param_env . and ( pred) , tcx)
1304
+ self . infcx . selection_cache . get ( & ( param_env , pred) , tcx)
1305
1305
}
1306
1306
1307
1307
/// Determines whether can we safely cache the result
@@ -1361,14 +1361,14 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
1361
1361
if !candidate. needs_infer ( ) {
1362
1362
debug ! ( ?pred, ?candidate, "insert_candidate_cache global" ) ;
1363
1363
// This may overwrite the cache with the same value.
1364
- tcx. selection_cache . insert ( param_env . and ( pred) , dep_node, candidate) ;
1364
+ tcx. selection_cache . insert ( ( param_env , pred) , dep_node, candidate) ;
1365
1365
return ;
1366
1366
}
1367
1367
}
1368
1368
}
1369
1369
1370
1370
debug ! ( ?pred, ?candidate, "insert_candidate_cache local" ) ;
1371
- self . infcx . selection_cache . insert ( param_env . and ( pred) , dep_node, candidate) ;
1371
+ self . infcx . selection_cache . insert ( ( param_env , pred) , dep_node, candidate) ;
1372
1372
}
1373
1373
1374
1374
/// Matches a predicate against the bounds of its self type.
0 commit comments