@@ -143,7 +143,7 @@ enum CombineMapType {
143
143
144
144
type CombineMap < ' tcx > = FxHashMap < TwoRegions < ' tcx > , RegionVid > ;
145
145
146
- pub struct RegionVarBindings < ' tcx > {
146
+ pub struct RegionConstraintCollector < ' tcx > {
147
147
pub ( in infer) var_origins : Vec < RegionVariableOrigin > ,
148
148
149
149
/// Constraints of the form `A <= B` introduced by the region
@@ -242,9 +242,9 @@ impl TaintDirections {
242
242
}
243
243
}
244
244
245
- impl < ' tcx > RegionVarBindings < ' tcx > {
246
- pub fn new ( ) -> RegionVarBindings < ' tcx > {
247
- RegionVarBindings {
245
+ impl < ' tcx > RegionConstraintCollector < ' tcx > {
246
+ pub fn new ( ) -> RegionConstraintCollector < ' tcx > {
247
+ RegionConstraintCollector {
248
248
var_origins : Vec :: new ( ) ,
249
249
constraints : BTreeMap :: new ( ) ,
250
250
verifys : Vec :: new ( ) ,
@@ -264,7 +264,7 @@ impl<'tcx> RegionVarBindings<'tcx> {
264
264
265
265
pub fn start_snapshot ( & mut self ) -> RegionSnapshot {
266
266
let length = self . undo_log . len ( ) ;
267
- debug ! ( "RegionVarBindings : start_snapshot({})" , length) ;
267
+ debug ! ( "RegionConstraintCollector : start_snapshot({})" , length) ;
268
268
self . undo_log . push ( OpenSnapshot ) ;
269
269
RegionSnapshot {
270
270
length,
@@ -274,7 +274,7 @@ impl<'tcx> RegionVarBindings<'tcx> {
274
274
}
275
275
276
276
pub fn commit ( & mut self , snapshot : RegionSnapshot ) {
277
- debug ! ( "RegionVarBindings : commit({})" , snapshot. length) ;
277
+ debug ! ( "RegionConstraintCollector : commit({})" , snapshot. length) ;
278
278
assert ! ( self . undo_log. len( ) > snapshot. length) ;
279
279
assert ! ( self . undo_log[ snapshot. length] == OpenSnapshot ) ;
280
280
assert ! (
@@ -294,7 +294,7 @@ impl<'tcx> RegionVarBindings<'tcx> {
294
294
}
295
295
296
296
pub fn rollback_to ( & mut self , snapshot : RegionSnapshot ) {
297
- debug ! ( "RegionVarBindings : rollback_to({:?})" , snapshot) ;
297
+ debug ! ( "RegionConstraintCollector : rollback_to({:?})" , snapshot) ;
298
298
assert ! ( self . undo_log. len( ) > snapshot. length) ;
299
299
assert ! ( self . undo_log[ snapshot. length] == OpenSnapshot ) ;
300
300
while self . undo_log . len ( ) > snapshot. length + 1 {
@@ -523,7 +523,7 @@ impl<'tcx> RegionVarBindings<'tcx> {
523
523
524
524
fn add_constraint ( & mut self , constraint : Constraint < ' tcx > , origin : SubregionOrigin < ' tcx > ) {
525
525
// cannot add constraints once regions are resolved
526
- debug ! ( "RegionVarBindings : add_constraint({:?})" , constraint) ;
526
+ debug ! ( "RegionConstraintCollector : add_constraint({:?})" , constraint) ;
527
527
528
528
// never overwrite an existing (constraint, origin) - only insert one if it isn't
529
529
// present in the map yet. This prevents origins from outside the snapshot being
@@ -542,7 +542,7 @@ impl<'tcx> RegionVarBindings<'tcx> {
542
542
543
543
fn add_verify ( & mut self , verify : Verify < ' tcx > ) {
544
544
// cannot add verifys once regions are resolved
545
- debug ! ( "RegionVarBindings : add_verify({:?})" , verify) ;
545
+ debug ! ( "RegionConstraintCollector : add_verify({:?})" , verify) ;
546
546
547
547
// skip no-op cases known to be satisfied
548
548
match verify. bound {
@@ -594,7 +594,7 @@ impl<'tcx> RegionVarBindings<'tcx> {
594
594
) {
595
595
// cannot add constraints once regions are resolved
596
596
debug ! (
597
- "RegionVarBindings : make_subregion({:?}, {:?}) due to {:?}" ,
597
+ "RegionConstraintCollector : make_subregion({:?}, {:?}) due to {:?}" ,
598
598
sub,
599
599
sup,
600
600
origin
@@ -651,7 +651,7 @@ impl<'tcx> RegionVarBindings<'tcx> {
651
651
b : Region < ' tcx > ,
652
652
) -> Region < ' tcx > {
653
653
// cannot add constraints once regions are resolved
654
- debug ! ( "RegionVarBindings : lub_regions({:?}, {:?})" , a, b) ;
654
+ debug ! ( "RegionConstraintCollector : lub_regions({:?}, {:?})" , a, b) ;
655
655
match ( a, b) {
656
656
( r @ & ReStatic , _) | ( _, r @ & ReStatic ) => {
657
657
r // nothing lives longer than static
@@ -673,7 +673,7 @@ impl<'tcx> RegionVarBindings<'tcx> {
673
673
b : Region < ' tcx > ,
674
674
) -> Region < ' tcx > {
675
675
// cannot add constraints once regions are resolved
676
- debug ! ( "RegionVarBindings : glb_regions({:?}, {:?})" , a, b) ;
676
+ debug ! ( "RegionConstraintCollector : glb_regions({:?}, {:?})" , a, b) ;
677
677
match ( a, b) {
678
678
( & ReStatic , r) | ( r, & ReStatic ) => {
679
679
r // static lives longer than everything else
0 commit comments