@@ -36,7 +36,7 @@ use rustc_span::def_id::CRATE_DEF_ID;
36
36
use rustc_span:: { Span , DUMMY_SP } ;
37
37
use rustc_target:: abi:: VariantIdx ;
38
38
use rustc_trait_selection:: infer:: InferCtxtExt as _;
39
- use rustc_trait_selection:: opaque_types:: { GenerateMemberConstraints , InferCtxtExt } ;
39
+ use rustc_trait_selection:: opaque_types:: InferCtxtExt ;
40
40
use rustc_trait_selection:: traits:: error_reporting:: InferCtxtExt as _;
41
41
use rustc_trait_selection:: traits:: query:: type_op;
42
42
use rustc_trait_selection:: traits:: query:: type_op:: custom:: CustomTypeOp ;
@@ -185,7 +185,6 @@ pub(crate) fn type_check<'mir, 'tcx>(
185
185
& region_bound_pairs,
186
186
implicit_region_bound,
187
187
& mut borrowck_context,
188
- & universal_region_relations,
189
188
|mut cx| {
190
189
cx. equate_inputs_and_outputs ( & body, universal_regions, & normalized_inputs_and_output) ;
191
190
liveness:: generate ( & mut cx, body, elements, flow_inits, move_data, location_table) ;
@@ -253,15 +252,7 @@ pub(crate) fn type_check<'mir, 'tcx>(
253
252
}
254
253
255
254
#[ instrument(
256
- skip(
257
- infcx,
258
- body,
259
- promoted,
260
- region_bound_pairs,
261
- borrowck_context,
262
- universal_region_relations,
263
- extra
264
- ) ,
255
+ skip( infcx, body, promoted, region_bound_pairs, borrowck_context, extra) ,
265
256
level = "debug"
266
257
) ]
267
258
fn type_check_internal < ' a , ' tcx , R > (
@@ -272,7 +263,6 @@ fn type_check_internal<'a, 'tcx, R>(
272
263
region_bound_pairs : & ' a RegionBoundPairs < ' tcx > ,
273
264
implicit_region_bound : ty:: Region < ' tcx > ,
274
265
borrowck_context : & ' a mut BorrowCheckContext < ' a , ' tcx > ,
275
- universal_region_relations : & ' a UniversalRegionRelations < ' tcx > ,
276
266
extra : impl FnOnce ( TypeChecker < ' a , ' tcx > ) -> R ,
277
267
) -> R {
278
268
let mut checker = TypeChecker :: new (
@@ -282,7 +272,6 @@ fn type_check_internal<'a, 'tcx, R>(
282
272
region_bound_pairs,
283
273
implicit_region_bound,
284
274
borrowck_context,
285
- universal_region_relations,
286
275
) ;
287
276
let errors_reported = {
288
277
let mut verifier = TypeVerifier :: new ( & mut checker, body, promoted) ;
@@ -901,7 +890,6 @@ struct TypeChecker<'a, 'tcx> {
901
890
implicit_region_bound : ty:: Region < ' tcx > ,
902
891
reported_errors : FxHashSet < ( Ty < ' tcx > , Span ) > ,
903
892
borrowck_context : & ' a mut BorrowCheckContext < ' a , ' tcx > ,
904
- universal_region_relations : & ' a UniversalRegionRelations < ' tcx > ,
905
893
}
906
894
907
895
struct BorrowCheckContext < ' a , ' tcx > {
@@ -1050,7 +1038,6 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
1050
1038
region_bound_pairs : & ' a RegionBoundPairs < ' tcx > ,
1051
1039
implicit_region_bound : ty:: Region < ' tcx > ,
1052
1040
borrowck_context : & ' a mut BorrowCheckContext < ' a , ' tcx > ,
1053
- universal_region_relations : & ' a UniversalRegionRelations < ' tcx > ,
1054
1041
) -> Self {
1055
1042
let mut checker = Self {
1056
1043
infcx,
@@ -1062,7 +1049,6 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
1062
1049
implicit_region_bound,
1063
1050
borrowck_context,
1064
1051
reported_errors : Default :: default ( ) ,
1065
- universal_region_relations,
1066
1052
} ;
1067
1053
checker. check_user_type_annotations ( ) ;
1068
1054
checker
@@ -1322,8 +1308,6 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
1322
1308
) ,
1323
1309
) ?;
1324
1310
1325
- let universal_region_relations = self . universal_region_relations ;
1326
-
1327
1311
// Finally, if we instantiated the anon types successfully, we
1328
1312
// have to solve any bounds (e.g., `-> impl Iterator` needs to
1329
1313
// prove that `T: Iterator` where `T` is the type we
@@ -1335,12 +1319,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
1335
1319
ConstraintCategory :: OpaqueType ,
1336
1320
CustomTypeOp :: new (
1337
1321
|infcx| {
1338
- infcx. constrain_opaque_type (
1339
- opaque_type_key,
1340
- & opaque_decl,
1341
- GenerateMemberConstraints :: IfNoStaticBound ,
1342
- universal_region_relations,
1343
- ) ;
1322
+ infcx. constrain_opaque_type ( opaque_type_key, & opaque_decl) ;
1344
1323
Ok ( InferOk { value : ( ) , obligations : vec ! [ ] } )
1345
1324
} ,
1346
1325
|| "opaque_type_map" . to_string ( ) ,
0 commit comments