@@ -20,7 +20,7 @@ use rustc_infer::infer::outlives::env::RegionBoundPairs;
20
20
use rustc_infer:: infer:: region_constraints:: RegionConstraintData ;
21
21
use rustc_infer:: infer:: type_variable:: { TypeVariableOrigin , TypeVariableOriginKind } ;
22
22
use rustc_infer:: infer:: {
23
- InferCtxt , InferOk , LateBoundRegionConversionTime , NllRegionVariableOrigin ,
23
+ InferCtxt , InferOk , LateBoundRegion , LateBoundRegionConversionTime , NllRegionVariableOrigin ,
24
24
} ;
25
25
use rustc_middle:: mir:: tcx:: PlaceTy ;
26
26
use rustc_middle:: mir:: visit:: { NonMutatingUseContext , PlaceContext , Visitor } ;
@@ -1436,11 +1436,13 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
1436
1436
return ;
1437
1437
}
1438
1438
} ;
1439
- let ( sig, map) = self . infcx . replace_bound_vars_with_fresh_vars (
1440
- term. source_info . span ,
1441
- LateBoundRegionConversionTime :: FnCall ,
1442
- sig,
1443
- ) ;
1439
+ let ( sig, map) = tcx. replace_late_bound_regions ( sig, |br| {
1440
+ self . infcx . next_region_var ( LateBoundRegion (
1441
+ term. source_info . span ,
1442
+ br. kind ,
1443
+ LateBoundRegionConversionTime :: FnCall ,
1444
+ ) )
1445
+ } ) ;
1444
1446
debug ! ( ?sig) ;
1445
1447
let sig = self . normalize ( sig, term_location) ;
1446
1448
self . check_call_dest ( body, term, & sig, * destination, target, term_location) ;
0 commit comments