@@ -127,55 +127,55 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
127127 // Map each placeholder region to a vector of other regions that it
128128 // must be equated with. (Note that this vector may include other
129129 // placeholder regions from `placeholder_map`.)
130- let skol_resolution_map : FxHashMap < _ , _ > =
130+ let placeholder_resolution_map : FxHashMap < _ , _ > =
131131 placeholder_map
132132 . iter ( )
133- . map ( |( & br, & skol ) | {
133+ . map ( |( & br, & placeholder ) | {
134134 let tainted_regions =
135135 self . infcx . tainted_regions ( snapshot,
136- skol ,
136+ placeholder ,
137137 TaintDirections :: incoming ( ) ) ; // [1]
138138
139139 // [1] this routine executes after the placeholder
140140 // regions have been *equated* with something
141141 // else, so examining the incoming edges ought to
142142 // be enough to collect all constraints
143143
144- ( skol , ( br, tainted_regions) )
144+ ( placeholder , ( br, tainted_regions) )
145145 } )
146146 . collect ( ) ;
147147
148148 // For each placeholder region, pick a representative -- which can
149149 // be any region from the sets above, except for other members of
150150 // `placeholder_map`. There should always be a representative if things
151151 // are properly well-formed.
152- let skol_representatives : FxHashMap < _ , _ > =
153- skol_resolution_map
152+ let placeholder_representatives : FxHashMap < _ , _ > =
153+ placeholder_resolution_map
154154 . iter ( )
155- . map ( |( & skol , & ( _, ref regions) ) | {
155+ . map ( |( & placeholder , & ( _, ref regions) ) | {
156156 let representative =
157157 regions. iter ( )
158- . filter ( |& & r| !skol_resolution_map . contains_key ( r) )
158+ . filter ( |& & r| !placeholder_resolution_map . contains_key ( r) )
159159 . cloned ( )
160160 . next ( )
161161 . unwrap_or_else ( || {
162162 bug ! ( "no representative region for `{:?}` in `{:?}`" ,
163- skol , regions)
163+ placeholder , regions)
164164 } ) ;
165165
166- ( skol , representative)
166+ ( placeholder , representative)
167167 } )
168168 . collect ( ) ;
169169
170- // Equate all the members of each skolemization set with the
170+ // Equate all the members of each placeholder set with the
171171 // 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 ] ;
174174 debug ! ( "higher_ranked_match: \
175- skol ={:?} representative={:?} regions={:?}",
176- skol , representative, regions) ;
175+ placeholder ={:?} representative={:?} regions={:?}",
176+ placeholder , representative, regions) ;
177177 for region in regions. iter ( )
178- . filter ( |& r| !skol_resolution_map . contains_key ( r) )
178+ . filter ( |& r| !placeholder_resolution_map . contains_key ( r) )
179179 . filter ( |& r| r != representative)
180180 {
181181 let origin = SubregionOrigin :: Subtype ( self . trace . clone ( ) ) ;
@@ -192,7 +192,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
192192 fold_regions_in (
193193 self . tcx ( ) ,
194194 & a_value,
195- |r, _| skol_representatives . get ( & r) . cloned ( ) . unwrap_or ( r) ) ;
195+ |r, _| placeholder_representatives . get ( & r) . cloned ( ) . unwrap_or ( r) ) ;
196196
197197 debug ! ( "higher_ranked_match: value={:?}" , a_value) ;
198198
@@ -582,7 +582,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
582582 /// the pop occurs as part of the rollback, so an explicit call is not
583583 /// needed (but is also permitted).
584584 ///
585- /// For more information about how skolemization for HRTBs works , see
585+ /// For more information about how placeholders and HRTBs work , see
586586 /// the [rustc guide].
587587 ///
588588 /// [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> {
638638 }
639639
640640 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 {
642642 // The inputs to a placeholder variable can only
643643 // be itself or other new variables.
644644 let incoming_taints = self . tainted_regions ( snapshot,
645- skol ,
645+ placeholder ,
646646 TaintDirections :: both ( ) ) ;
647647 for & tainted_region in & incoming_taints {
648648 // Each placeholder should only be relatable to itself
@@ -654,21 +654,21 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
654654 }
655655 }
656656 _ => {
657- if tainted_region == skol { continue ; }
657+ if tainted_region == placeholder { continue ; }
658658 }
659659 } ;
660660
661661 debug ! ( "{:?} (which replaced {:?}) is tainted by {:?}" ,
662- skol ,
663- skol_br ,
662+ placeholder ,
663+ placeholder_br ,
664664 tainted_region) ;
665665
666666 return Err ( if overly_polymorphic {
667667 debug ! ( "Overly polymorphic!" ) ;
668- TypeError :: RegionsOverlyPolymorphic ( skol_br , tainted_region)
668+ TypeError :: RegionsOverlyPolymorphic ( placeholder_br , tainted_region)
669669 } else {
670670 debug ! ( "Not as polymorphic!" ) ;
671- TypeError :: RegionsInsufficientlyPolymorphic ( skol_br , tainted_region)
671+ TypeError :: RegionsInsufficientlyPolymorphic ( placeholder_br , tainted_region)
672672 } )
673673 }
674674 }
@@ -725,10 +725,10 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
725725 let inv_placeholder_map: FxHashMap < ty:: Region < ' tcx > , ty:: BoundRegion > =
726726 placeholder_map
727727 . 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 ( ) )
730730 . into_iter ( )
731- . map ( move |tainted_region| ( tainted_region, skol_br ) )
731+ . map ( move |tainted_region| ( tainted_region, placeholder_br ) )
732732 } )
733733 . collect ( ) ;
734734
@@ -739,7 +739,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
739739 // references to regions from the `fold_regions` code below.
740740 let value = self . resolve_type_vars_if_possible ( & value) ;
741741
742- // Map any skolemization byproducts back to a late-bound
742+ // Map any placeholder byproducts back to a late-bound
743743 // region. Put that late-bound region at whatever the outermost
744744 // binder is that we encountered in `value`. The caller is
745745 // responsible for ensuring that (a) `value` contains at least one
@@ -798,10 +798,10 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
798798 snapshot : & CombinedSnapshot < ' a , ' tcx > ,
799799 ) {
800800 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 ( ) ;
802802 self . borrow_region_constraints ( )
803803 . pop_placeholders (
804- & skol_regions ,
804+ & placeholder_regions ,
805805 & snapshot. region_constraints_snapshot ,
806806 ) ;
807807 self . universe . set ( snapshot. universe ) ;
0 commit comments