@@ -127,55 +127,55 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
127
127
// Map each placeholder region to a vector of other regions that it
128
128
// must be equated with. (Note that this vector may include other
129
129
// placeholder regions from `placeholder_map`.)
130
- let skol_resolution_map : FxHashMap < _ , _ > =
130
+ let placeholder_resolution_map : FxHashMap < _ , _ > =
131
131
placeholder_map
132
132
. iter ( )
133
- . map ( |( & br, & skol ) | {
133
+ . map ( |( & br, & placeholder ) | {
134
134
let tainted_regions =
135
135
self . infcx . tainted_regions ( snapshot,
136
- skol ,
136
+ placeholder ,
137
137
TaintDirections :: incoming ( ) ) ; // [1]
138
138
139
139
// [1] this routine executes after the placeholder
140
140
// regions have been *equated* with something
141
141
// else, so examining the incoming edges ought to
142
142
// be enough to collect all constraints
143
143
144
- ( skol , ( br, tainted_regions) )
144
+ ( placeholder , ( br, tainted_regions) )
145
145
} )
146
146
. collect ( ) ;
147
147
148
148
// For each placeholder region, pick a representative -- which can
149
149
// be any region from the sets above, except for other members of
150
150
// `placeholder_map`. There should always be a representative if things
151
151
// are properly well-formed.
152
- let skol_representatives : FxHashMap < _ , _ > =
153
- skol_resolution_map
152
+ let placeholder_representatives : FxHashMap < _ , _ > =
153
+ placeholder_resolution_map
154
154
. iter ( )
155
- . map ( |( & skol , & ( _, ref regions) ) | {
155
+ . map ( |( & placeholder , & ( _, ref regions) ) | {
156
156
let representative =
157
157
regions. iter ( )
158
- . filter ( |& & r| !skol_resolution_map . contains_key ( r) )
158
+ . filter ( |& & r| !placeholder_resolution_map . contains_key ( r) )
159
159
. cloned ( )
160
160
. next ( )
161
161
. unwrap_or_else ( || {
162
162
bug ! ( "no representative region for `{:?}` in `{:?}`" ,
163
- skol , regions)
163
+ placeholder , regions)
164
164
} ) ;
165
165
166
- ( skol , representative)
166
+ ( placeholder , representative)
167
167
} )
168
168
. collect ( ) ;
169
169
170
- // Equate all the members of each skolemization set with the
170
+ // Equate all the members of each placeholder set with the
171
171
// representative.
172
- for ( skol , & ( _br, ref regions) ) in & skol_resolution_map {
173
- let representative = & skol_representatives [ skol ] ;
172
+ for ( placeholder , & ( _br, ref regions) ) in & placeholder_resolution_map {
173
+ let representative = & placeholder_representatives [ placeholder ] ;
174
174
debug ! ( "higher_ranked_match: \
175
- skol ={:?} representative={:?} regions={:?}",
176
- skol , representative, regions) ;
175
+ placeholder ={:?} representative={:?} regions={:?}",
176
+ placeholder , representative, regions) ;
177
177
for region in regions. iter ( )
178
- . filter ( |& r| !skol_resolution_map . contains_key ( r) )
178
+ . filter ( |& r| !placeholder_resolution_map . contains_key ( r) )
179
179
. filter ( |& r| r != representative)
180
180
{
181
181
let origin = SubregionOrigin :: Subtype ( self . trace . clone ( ) ) ;
@@ -192,7 +192,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
192
192
fold_regions_in (
193
193
self . tcx ( ) ,
194
194
& a_value,
195
- |r, _| skol_representatives . get ( & r) . cloned ( ) . unwrap_or ( r) ) ;
195
+ |r, _| placeholder_representatives . get ( & r) . cloned ( ) . unwrap_or ( r) ) ;
196
196
197
197
debug ! ( "higher_ranked_match: value={:?}" , a_value) ;
198
198
@@ -582,7 +582,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
582
582
/// the pop occurs as part of the rollback, so an explicit call is not
583
583
/// needed (but is also permitted).
584
584
///
585
- /// For more information about how skolemization for HRTBs works , see
585
+ /// For more information about how placeholders and HRTBs work , see
586
586
/// the [rustc guide].
587
587
///
588
588
/// [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/traits/hrtb.html
@@ -638,11 +638,11 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
638
638
}
639
639
640
640
let new_vars = self . region_vars_confined_to_snapshot ( snapshot) ;
641
- for ( & skol_br , & skol ) in placeholder_map {
641
+ for ( & placeholder_br , & placeholder ) in placeholder_map {
642
642
// The inputs to a placeholder variable can only
643
643
// be itself or other new variables.
644
644
let incoming_taints = self . tainted_regions ( snapshot,
645
- skol ,
645
+ placeholder ,
646
646
TaintDirections :: both ( ) ) ;
647
647
for & tainted_region in & incoming_taints {
648
648
// Each placeholder should only be relatable to itself
@@ -654,21 +654,21 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
654
654
}
655
655
}
656
656
_ => {
657
- if tainted_region == skol { continue ; }
657
+ if tainted_region == placeholder { continue ; }
658
658
}
659
659
} ;
660
660
661
661
debug ! ( "{:?} (which replaced {:?}) is tainted by {:?}" ,
662
- skol ,
663
- skol_br ,
662
+ placeholder ,
663
+ placeholder_br ,
664
664
tainted_region) ;
665
665
666
666
return Err ( if overly_polymorphic {
667
667
debug ! ( "Overly polymorphic!" ) ;
668
- TypeError :: RegionsOverlyPolymorphic ( skol_br , tainted_region)
668
+ TypeError :: RegionsOverlyPolymorphic ( placeholder_br , tainted_region)
669
669
} else {
670
670
debug ! ( "Not as polymorphic!" ) ;
671
- TypeError :: RegionsInsufficientlyPolymorphic ( skol_br , tainted_region)
671
+ TypeError :: RegionsInsufficientlyPolymorphic ( placeholder_br , tainted_region)
672
672
} )
673
673
}
674
674
}
@@ -725,10 +725,10 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
725
725
let inv_placeholder_map: FxHashMap < ty:: Region < ' tcx > , ty:: BoundRegion > =
726
726
placeholder_map
727
727
. iter ( )
728
- . flat_map ( |( & skol_br , & skol ) | {
729
- self . tainted_regions ( snapshot, skol , TaintDirections :: both ( ) )
728
+ . flat_map ( |( & placeholder_br , & placeholder ) | {
729
+ self . tainted_regions ( snapshot, placeholder , TaintDirections :: both ( ) )
730
730
. into_iter ( )
731
- . map ( move |tainted_region| ( tainted_region, skol_br ) )
731
+ . map ( move |tainted_region| ( tainted_region, placeholder_br ) )
732
732
} )
733
733
. collect ( ) ;
734
734
@@ -739,7 +739,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
739
739
// references to regions from the `fold_regions` code below.
740
740
let value = self . resolve_type_vars_if_possible ( & value) ;
741
741
742
- // Map any skolemization byproducts back to a late-bound
742
+ // Map any placeholder byproducts back to a late-bound
743
743
// region. Put that late-bound region at whatever the outermost
744
744
// binder is that we encountered in `value`. The caller is
745
745
// responsible for ensuring that (a) `value` contains at least one
@@ -798,10 +798,10 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
798
798
snapshot : & CombinedSnapshot < ' a , ' tcx > ,
799
799
) {
800
800
debug ! ( "pop_placeholders({:?})" , placeholder_map) ;
801
- let skol_regions : FxHashSet < _ > = placeholder_map. values ( ) . cloned ( ) . collect ( ) ;
801
+ let placeholder_regions : FxHashSet < _ > = placeholder_map. values ( ) . cloned ( ) . collect ( ) ;
802
802
self . borrow_region_constraints ( )
803
803
. pop_placeholders (
804
- & skol_regions ,
804
+ & placeholder_regions ,
805
805
& snapshot. region_constraints_snapshot ,
806
806
) ;
807
807
self . universe . set ( snapshot. universe ) ;
0 commit comments