@@ -20,7 +20,7 @@ use rustc_infer::infer::outlives::env::RegionBoundPairs;
2020use rustc_infer:: infer:: region_constraints:: RegionConstraintData ;
2121use rustc_infer:: infer:: type_variable:: { TypeVariableOrigin , TypeVariableOriginKind } ;
2222use rustc_infer:: infer:: {
23- InferCtxt , InferOk , LateBoundRegionConversionTime , NllRegionVariableOrigin ,
23+ InferCtxt , InferOk , LateBoundRegion , LateBoundRegionConversionTime , NllRegionVariableOrigin ,
2424} ;
2525use rustc_middle:: mir:: tcx:: PlaceTy ;
2626use rustc_middle:: mir:: visit:: { NonMutatingUseContext , PlaceContext , Visitor } ;
@@ -1436,11 +1436,13 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
14361436 return ;
14371437 }
14381438 } ;
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+ } ) ;
14441446 debug ! ( ?sig) ;
14451447 let sig = self . normalize ( sig, term_location) ;
14461448 self . check_call_dest ( body, term, & sig, * destination, target, term_location) ;
0 commit comments