@@ -674,13 +674,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
674674 // eagerly.
675675 let mut outlives_requirements = infcx. tcx . is_typeck_child ( mir_def_id) . then ( Vec :: new) ;
676676
677- self . check_type_tests (
678- infcx,
679- param_env,
680- body,
681- outlives_requirements. as_mut ( ) ,
682- & mut errors_buffer,
683- ) ;
677+ self . check_type_tests ( infcx, body, outlives_requirements. as_mut ( ) , & mut errors_buffer) ;
684678
685679 debug ! ( ?errors_buffer) ;
686680 debug ! ( ?outlives_requirements) ;
@@ -938,7 +932,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
938932 fn check_type_tests (
939933 & self ,
940934 infcx : & InferCtxt < ' tcx > ,
941- param_env : ty:: ParamEnv < ' tcx > ,
942935 body : & Body < ' tcx > ,
943936 mut propagated_outlives_requirements : Option < & mut Vec < ClosureOutlivesRequirement < ' tcx > > > ,
944937 errors_buffer : & mut RegionErrors < ' tcx > ,
@@ -956,7 +949,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
956949 let generic_ty = type_test. generic_kind . to_ty ( tcx) ;
957950 if self . eval_verify_bound (
958951 infcx,
959- param_env,
960952 generic_ty,
961953 type_test. lower_bound ,
962954 & type_test. verify_bound ,
@@ -967,7 +959,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
967959 if let Some ( propagated_outlives_requirements) = & mut propagated_outlives_requirements {
968960 if self . try_promote_type_test (
969961 infcx,
970- param_env,
971962 body,
972963 type_test,
973964 propagated_outlives_requirements,
@@ -1025,7 +1016,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
10251016 fn try_promote_type_test (
10261017 & self ,
10271018 infcx : & InferCtxt < ' tcx > ,
1028- param_env : ty:: ParamEnv < ' tcx > ,
10291019 body : & Body < ' tcx > ,
10301020 type_test : & TypeTest < ' tcx > ,
10311021 propagated_outlives_requirements : & mut Vec < ClosureOutlivesRequirement < ' tcx > > ,
@@ -1087,7 +1077,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
10871077 // where `ur` is a local bound -- we are sometimes in a
10881078 // position to prove things that our caller cannot. See
10891079 // #53570 for an example.
1090- if self . eval_verify_bound ( infcx, param_env , generic_ty, ur, & type_test. verify_bound ) {
1080+ if self . eval_verify_bound ( infcx, generic_ty, ur, & type_test. verify_bound ) {
10911081 continue ;
10921082 }
10931083
@@ -1270,7 +1260,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
12701260 fn eval_verify_bound (
12711261 & self ,
12721262 infcx : & InferCtxt < ' tcx > ,
1273- param_env : ty:: ParamEnv < ' tcx > ,
12741263 generic_ty : Ty < ' tcx > ,
12751264 lower_bound : RegionVid ,
12761265 verify_bound : & VerifyBound < ' tcx > ,
@@ -1279,7 +1268,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
12791268
12801269 match verify_bound {
12811270 VerifyBound :: IfEq ( verify_if_eq_b) => {
1282- self . eval_if_eq ( infcx, param_env , generic_ty, lower_bound, * verify_if_eq_b)
1271+ self . eval_if_eq ( infcx, generic_ty, lower_bound, * verify_if_eq_b)
12831272 }
12841273
12851274 VerifyBound :: IsEmpty => {
@@ -1293,31 +1282,25 @@ impl<'tcx> RegionInferenceContext<'tcx> {
12931282 }
12941283
12951284 VerifyBound :: AnyBound ( verify_bounds) => verify_bounds. iter ( ) . any ( |verify_bound| {
1296- self . eval_verify_bound ( infcx, param_env , generic_ty, lower_bound, verify_bound)
1285+ self . eval_verify_bound ( infcx, generic_ty, lower_bound, verify_bound)
12971286 } ) ,
12981287
12991288 VerifyBound :: AllBounds ( verify_bounds) => verify_bounds. iter ( ) . all ( |verify_bound| {
1300- self . eval_verify_bound ( infcx, param_env , generic_ty, lower_bound, verify_bound)
1289+ self . eval_verify_bound ( infcx, generic_ty, lower_bound, verify_bound)
13011290 } ) ,
13021291 }
13031292 }
13041293
13051294 fn eval_if_eq (
13061295 & self ,
13071296 infcx : & InferCtxt < ' tcx > ,
1308- param_env : ty:: ParamEnv < ' tcx > ,
13091297 generic_ty : Ty < ' tcx > ,
13101298 lower_bound : RegionVid ,
13111299 verify_if_eq_b : ty:: Binder < ' tcx , VerifyIfEq < ' tcx > > ,
13121300 ) -> bool {
13131301 let generic_ty = self . normalize_to_scc_representatives ( infcx. tcx , generic_ty) ;
13141302 let verify_if_eq_b = self . normalize_to_scc_representatives ( infcx. tcx , verify_if_eq_b) ;
1315- match test_type_match:: extract_verify_if_eq (
1316- infcx. tcx ,
1317- param_env,
1318- & verify_if_eq_b,
1319- generic_ty,
1320- ) {
1303+ match test_type_match:: extract_verify_if_eq ( infcx. tcx , & verify_if_eq_b, generic_ty) {
13211304 Some ( r) => {
13221305 let r_vid = self . to_region_vid ( r) ;
13231306 self . eval_outlives ( r_vid, lower_bound)
0 commit comments