@@ -1046,11 +1046,11 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
10461046
10471047 let tcx = self . tcx ( ) ;
10481048 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) {
10501050 return Some ( res) ;
10511051 }
10521052 }
1053- self . infcx . evaluation_cache . get ( & param_env . and ( trait_pred) , tcx)
1053+ self . infcx . evaluation_cache . get ( & ( param_env , trait_pred) , tcx)
10541054 }
10551055
10561056 fn insert_evaluation_cache (
@@ -1081,13 +1081,13 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
10811081 // FIXME: Due to #50507 this overwrites the different values
10821082 // This should be changed to use HashMapExt::insert_same
10831083 // 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) ;
10851085 return ;
10861086 }
10871087 }
10881088
10891089 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) ;
10911091 }
10921092
10931093 /// For various reasons, it's possible for a subobligation
@@ -1297,11 +1297,11 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
12971297 pred. remap_constness ( tcx, & mut param_env) ;
12981298
12991299 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) {
13011301 return Some ( res) ;
13021302 }
13031303 }
1304- self . infcx . selection_cache . get ( & param_env . and ( pred) , tcx)
1304+ self . infcx . selection_cache . get ( & ( param_env , pred) , tcx)
13051305 }
13061306
13071307 /// Determines whether can we safely cache the result
@@ -1361,14 +1361,14 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
13611361 if !candidate. needs_infer ( ) {
13621362 debug ! ( ?pred, ?candidate, "insert_candidate_cache global" ) ;
13631363 // 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) ;
13651365 return ;
13661366 }
13671367 }
13681368 }
13691369
13701370 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) ;
13721372 }
13731373
13741374 /// Matches a predicate against the bounds of its self type.
0 commit comments