@@ -104,7 +104,7 @@ pub struct InferCtxt<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
104
104
float_unification_table : RefCell < UnificationTable < ty:: FloatVid > > ,
105
105
106
106
// For region variables.
107
- region_constraints : RefCell < RegionConstraints < ' tcx > > ,
107
+ region_constraints : RefCell < RegionVarBindings < ' tcx > > ,
108
108
109
109
// Once region inference is done, the values for each variable.
110
110
lexical_region_resolutions : RefCell < Option < LexicalRegionResolutions < ' tcx > > > ,
@@ -424,7 +424,7 @@ impl<'a, 'gcx, 'tcx> InferCtxtBuilder<'a, 'gcx, 'tcx> {
424
424
type_variables : RefCell :: new ( type_variable:: TypeVariableTable :: new ( ) ) ,
425
425
int_unification_table : RefCell :: new ( UnificationTable :: new ( ) ) ,
426
426
float_unification_table : RefCell :: new ( UnificationTable :: new ( ) ) ,
427
- region_vars : RefCell :: new ( RegionVarBindings :: new ( ) ) ,
427
+ region_constraints : RefCell :: new ( RegionVarBindings :: new ( ) ) ,
428
428
lexical_region_resolutions : RefCell :: new ( None ) ,
429
429
selection_cache : traits:: SelectionCache :: new ( ) ,
430
430
evaluation_cache : traits:: EvaluationCache :: new ( ) ,
@@ -459,7 +459,7 @@ pub struct CombinedSnapshot<'a, 'tcx:'a> {
459
459
type_snapshot : type_variable:: Snapshot ,
460
460
int_snapshot : unify:: Snapshot < ty:: IntVid > ,
461
461
float_snapshot : unify:: Snapshot < ty:: FloatVid > ,
462
- region_vars_snapshot : RegionSnapshot ,
462
+ region_constraints_snapshot : RegionSnapshot ,
463
463
was_in_snapshot : bool ,
464
464
_in_progress_tables : Option < Ref < ' a , ty:: TypeckTables < ' tcx > > > ,
465
465
}
@@ -767,7 +767,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
767
767
type_snapshot : self . type_variables . borrow_mut ( ) . snapshot ( ) ,
768
768
int_snapshot : self . int_unification_table . borrow_mut ( ) . snapshot ( ) ,
769
769
float_snapshot : self . float_unification_table . borrow_mut ( ) . snapshot ( ) ,
770
- region_vars_snapshot : self . region_vars . borrow_mut ( ) . start_snapshot ( ) ,
770
+ region_constraints_snapshot : self . region_constraints . borrow_mut ( ) . start_snapshot ( ) ,
771
771
was_in_snapshot : in_snapshot,
772
772
// Borrow tables "in progress" (i.e. during typeck)
773
773
// to ban writes from within a snapshot to them.
@@ -783,7 +783,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
783
783
type_snapshot,
784
784
int_snapshot,
785
785
float_snapshot,
786
- region_vars_snapshot ,
786
+ region_constraints_snapshot ,
787
787
was_in_snapshot,
788
788
_in_progress_tables } = snapshot;
789
789
@@ -801,9 +801,9 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
801
801
self . float_unification_table
802
802
. borrow_mut ( )
803
803
. rollback_to ( float_snapshot) ;
804
- self . region_vars
804
+ self . region_constraints
805
805
. borrow_mut ( )
806
- . rollback_to ( region_vars_snapshot ) ;
806
+ . rollback_to ( region_constraints_snapshot ) ;
807
807
}
808
808
809
809
fn commit_from ( & self , snapshot : CombinedSnapshot ) {
@@ -812,7 +812,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
812
812
type_snapshot,
813
813
int_snapshot,
814
814
float_snapshot,
815
- region_vars_snapshot ,
815
+ region_constraints_snapshot ,
816
816
was_in_snapshot,
817
817
_in_progress_tables } = snapshot;
818
818
@@ -830,9 +830,9 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
830
830
self . float_unification_table
831
831
. borrow_mut ( )
832
832
. commit ( float_snapshot) ;
833
- self . region_vars
833
+ self . region_constraints
834
834
. borrow_mut ( )
835
- . commit ( region_vars_snapshot ) ;
835
+ . commit ( region_constraints_snapshot ) ;
836
836
}
837
837
838
838
/// Execute `f` and commit the bindings
@@ -887,7 +887,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
887
887
sub : ty:: Region < ' tcx > ,
888
888
sup : ty:: RegionVid )
889
889
{
890
- self . region_vars . borrow_mut ( ) . add_given ( sub, sup) ;
890
+ self . region_constraints . borrow_mut ( ) . add_given ( sub, sup) ;
891
891
}
892
892
893
893
pub fn can_sub < T > ( & self ,
@@ -927,7 +927,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
927
927
a : ty:: Region < ' tcx > ,
928
928
b : ty:: Region < ' tcx > ) {
929
929
debug ! ( "sub_regions({:?} <: {:?})" , a, b) ;
930
- self . region_vars . borrow_mut ( ) . make_subregion ( origin, a, b) ;
930
+ self . region_constraints . borrow_mut ( ) . make_subregion ( origin, a, b) ;
931
931
}
932
932
933
933
pub fn equality_predicate ( & self ,
@@ -1030,7 +1030,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
1030
1030
1031
1031
pub fn next_region_var ( & self , origin : RegionVariableOrigin )
1032
1032
-> ty:: Region < ' tcx > {
1033
- self . tcx . mk_region ( ty:: ReVar ( self . region_vars . borrow_mut ( ) . new_region_var ( origin) ) )
1033
+ self . tcx . mk_region ( ty:: ReVar ( self . region_constraints . borrow_mut ( ) . new_region_var ( origin) ) )
1034
1034
}
1035
1035
1036
1036
/// Create a region inference variable for the given
@@ -1127,7 +1127,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
1127
1127
region_map,
1128
1128
free_regions) ;
1129
1129
let ( lexical_region_resolutions, errors) =
1130
- self . region_vars . borrow_mut ( ) . resolve_regions ( & region_rels) ;
1130
+ self . region_constraints . borrow_mut ( ) . resolve_regions ( & region_rels) ;
1131
1131
1132
1132
let old_value = self . lexical_region_resolutions . replace ( Some ( lexical_region_resolutions) ) ;
1133
1133
assert ! ( old_value. is_none( ) ) ;
@@ -1365,7 +1365,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
1365
1365
a,
1366
1366
bound) ;
1367
1367
1368
- self . region_vars . borrow_mut ( ) . verify_generic_bound ( origin, kind, a, bound) ;
1368
+ self . region_constraints . borrow_mut ( ) . verify_generic_bound ( origin, kind, a, bound) ;
1369
1369
}
1370
1370
1371
1371
pub fn type_moves_by_default ( & self ,
0 commit comments