@@ -674,13 +674,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
674
674
// eagerly.
675
675
let mut outlives_requirements = infcx. tcx . is_typeck_child ( mir_def_id) . then ( Vec :: new) ;
676
676
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) ;
684
678
685
679
debug ! ( ?errors_buffer) ;
686
680
debug ! ( ?outlives_requirements) ;
@@ -938,7 +932,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
938
932
fn check_type_tests (
939
933
& self ,
940
934
infcx : & InferCtxt < ' tcx > ,
941
- param_env : ty:: ParamEnv < ' tcx > ,
942
935
body : & Body < ' tcx > ,
943
936
mut propagated_outlives_requirements : Option < & mut Vec < ClosureOutlivesRequirement < ' tcx > > > ,
944
937
errors_buffer : & mut RegionErrors < ' tcx > ,
@@ -956,7 +949,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
956
949
let generic_ty = type_test. generic_kind . to_ty ( tcx) ;
957
950
if self . eval_verify_bound (
958
951
infcx,
959
- param_env,
960
952
generic_ty,
961
953
type_test. lower_bound ,
962
954
& type_test. verify_bound ,
@@ -967,7 +959,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
967
959
if let Some ( propagated_outlives_requirements) = & mut propagated_outlives_requirements {
968
960
if self . try_promote_type_test (
969
961
infcx,
970
- param_env,
971
962
body,
972
963
type_test,
973
964
propagated_outlives_requirements,
@@ -1025,7 +1016,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
1025
1016
fn try_promote_type_test (
1026
1017
& self ,
1027
1018
infcx : & InferCtxt < ' tcx > ,
1028
- param_env : ty:: ParamEnv < ' tcx > ,
1029
1019
body : & Body < ' tcx > ,
1030
1020
type_test : & TypeTest < ' tcx > ,
1031
1021
propagated_outlives_requirements : & mut Vec < ClosureOutlivesRequirement < ' tcx > > ,
@@ -1087,7 +1077,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
1087
1077
// where `ur` is a local bound -- we are sometimes in a
1088
1078
// position to prove things that our caller cannot. See
1089
1079
// #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 ) {
1091
1081
continue ;
1092
1082
}
1093
1083
@@ -1270,7 +1260,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
1270
1260
fn eval_verify_bound (
1271
1261
& self ,
1272
1262
infcx : & InferCtxt < ' tcx > ,
1273
- param_env : ty:: ParamEnv < ' tcx > ,
1274
1263
generic_ty : Ty < ' tcx > ,
1275
1264
lower_bound : RegionVid ,
1276
1265
verify_bound : & VerifyBound < ' tcx > ,
@@ -1279,7 +1268,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
1279
1268
1280
1269
match verify_bound {
1281
1270
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)
1283
1272
}
1284
1273
1285
1274
VerifyBound :: IsEmpty => {
@@ -1293,31 +1282,25 @@ impl<'tcx> RegionInferenceContext<'tcx> {
1293
1282
}
1294
1283
1295
1284
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)
1297
1286
} ) ,
1298
1287
1299
1288
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)
1301
1290
} ) ,
1302
1291
}
1303
1292
}
1304
1293
1305
1294
fn eval_if_eq (
1306
1295
& self ,
1307
1296
infcx : & InferCtxt < ' tcx > ,
1308
- param_env : ty:: ParamEnv < ' tcx > ,
1309
1297
generic_ty : Ty < ' tcx > ,
1310
1298
lower_bound : RegionVid ,
1311
1299
verify_if_eq_b : ty:: Binder < ' tcx , VerifyIfEq < ' tcx > > ,
1312
1300
) -> bool {
1313
1301
let generic_ty = self . normalize_to_scc_representatives ( infcx. tcx , generic_ty) ;
1314
1302
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) {
1321
1304
Some ( r) => {
1322
1305
let r_vid = self . to_region_vid ( r) ;
1323
1306
self . eval_outlives ( r_vid, lower_bound)
0 commit comments