1
1
pub use self :: at:: DefineOpaqueTypes ;
2
2
pub use self :: freshen:: TypeFreshener ;
3
3
pub use self :: lexical_region_resolve:: RegionResolutionError ;
4
- pub use self :: LateBoundRegionConversionTime :: * ;
4
+ pub use self :: BoundRegionConversionTime :: * ;
5
5
pub use self :: RegionVariableOrigin :: * ;
6
6
pub use self :: SubregionOrigin :: * ;
7
7
pub use self :: ValuePairs :: * ;
@@ -472,9 +472,9 @@ impl<'tcx> SubregionOrigin<'tcx> {
472
472
}
473
473
}
474
474
475
- /// Times when we replace late- bound regions with variables :
475
+ /// Times when we replace bound regions with existentials :
476
476
#[ derive( Clone , Copy , Debug ) ]
477
- pub enum LateBoundRegionConversionTime {
477
+ pub enum BoundRegionConversionTime {
478
478
/// when a fn is called
479
479
FnCall ,
480
480
@@ -510,9 +510,9 @@ pub enum RegionVariableOrigin {
510
510
/// Region variables created as the values for early-bound regions.
511
511
EarlyBoundRegion ( Span , Symbol ) ,
512
512
513
- /// Region variables created for bound regions
514
- /// in a function or method that is called .
515
- LateBoundRegion ( Span , ty:: BoundRegionKind , LateBoundRegionConversionTime ) ,
513
+ /// Region variables created when instantiating a binder with
514
+ /// existential variables, e.g. when calling a function or method.
515
+ BoundRegion ( Span , ty:: BoundRegionKind , BoundRegionConversionTime ) ,
516
516
517
517
UpvarRegion ( ty:: UpvarId , Span ) ,
518
518
@@ -1456,13 +1456,13 @@ impl<'tcx> InferCtxt<'tcx> {
1456
1456
// variables in the current universe.
1457
1457
//
1458
1458
// Use this method if you'd like to find some substitution of the binder's
1459
- // variables (e.g. during a method call). If there isn't a [`LateBoundRegionConversionTime `]
1459
+ // variables (e.g. during a method call). If there isn't a [`BoundRegionConversionTime `]
1460
1460
// that corresponds to your use case, consider whether or not you should
1461
1461
// use [`InferCtxt::instantiate_binder_with_placeholders`] instead.
1462
1462
pub fn instantiate_binder_with_fresh_vars < T > (
1463
1463
& self ,
1464
1464
span : Span ,
1465
- lbrct : LateBoundRegionConversionTime ,
1465
+ lbrct : BoundRegionConversionTime ,
1466
1466
value : ty:: Binder < ' tcx , T > ,
1467
1467
) -> T
1468
1468
where
@@ -1475,7 +1475,7 @@ impl<'tcx> InferCtxt<'tcx> {
1475
1475
struct ToFreshVars < ' a , ' tcx > {
1476
1476
infcx : & ' a InferCtxt < ' tcx > ,
1477
1477
span : Span ,
1478
- lbrct : LateBoundRegionConversionTime ,
1478
+ lbrct : BoundRegionConversionTime ,
1479
1479
map : FxHashMap < ty:: BoundVar , ty:: GenericArg < ' tcx > > ,
1480
1480
}
1481
1481
@@ -1485,7 +1485,7 @@ impl<'tcx> InferCtxt<'tcx> {
1485
1485
. entry ( br. var )
1486
1486
. or_insert_with ( || {
1487
1487
self . infcx
1488
- . next_region_var ( LateBoundRegion ( self . span , br. kind , self . lbrct ) )
1488
+ . next_region_var ( BoundRegion ( self . span , br. kind , self . lbrct ) )
1489
1489
. into ( )
1490
1490
} )
1491
1491
. expect_region ( )
@@ -2042,7 +2042,7 @@ impl RegionVariableOrigin {
2042
2042
| Autoref ( a)
2043
2043
| Coercion ( a)
2044
2044
| EarlyBoundRegion ( a, ..)
2045
- | LateBoundRegion ( a, ..)
2045
+ | BoundRegion ( a, ..)
2046
2046
| UpvarRegion ( _, a) => a,
2047
2047
Nll ( ..) => bug ! ( "NLL variable used with `span`" ) ,
2048
2048
}
0 commit comments