@@ -150,7 +150,7 @@ crate enum RegionElement {
150
150
151
151
/// A placeholder (e.g., instantiated from a `for<'a> fn(&'a u32)`
152
152
/// type).
153
- PlaceholderRegion ( ty:: Placeholder ) ,
153
+ PlaceholderRegion ( ty:: PlaceholderRegion ) ,
154
154
}
155
155
156
156
/// When we initially compute liveness, we use a bit matrix storing
@@ -219,17 +219,17 @@ impl<N: Idx> LivenessValues<N> {
219
219
}
220
220
}
221
221
222
- /// Maps from `ty::Placeholder ` values that are used in the rest of
222
+ /// Maps from `ty::PlaceholderRegion ` values that are used in the rest of
223
223
/// rustc to the internal `PlaceholderIndex` values that are used in
224
224
/// NLL.
225
225
#[ derive( Default ) ]
226
226
crate struct PlaceholderIndices {
227
- to_index : FxHashMap < ty:: Placeholder , PlaceholderIndex > ,
228
- from_index : IndexVec < PlaceholderIndex , ty:: Placeholder > ,
227
+ to_index : FxHashMap < ty:: PlaceholderRegion , PlaceholderIndex > ,
228
+ from_index : IndexVec < PlaceholderIndex , ty:: PlaceholderRegion > ,
229
229
}
230
230
231
231
impl PlaceholderIndices {
232
- crate fn insert ( & mut self , placeholder : ty:: Placeholder ) -> PlaceholderIndex {
232
+ crate fn insert ( & mut self , placeholder : ty:: PlaceholderRegion ) -> PlaceholderIndex {
233
233
let PlaceholderIndices {
234
234
to_index,
235
235
from_index,
@@ -239,11 +239,11 @@ impl PlaceholderIndices {
239
239
. or_insert_with ( || from_index. push ( placeholder) )
240
240
}
241
241
242
- crate fn lookup_index ( & self , placeholder : ty:: Placeholder ) -> PlaceholderIndex {
242
+ crate fn lookup_index ( & self , placeholder : ty:: PlaceholderRegion ) -> PlaceholderIndex {
243
243
self . to_index [ & placeholder]
244
244
}
245
245
246
- crate fn lookup_placeholder ( & self , placeholder : PlaceholderIndex ) -> ty:: Placeholder {
246
+ crate fn lookup_placeholder ( & self , placeholder : PlaceholderIndex ) -> ty:: PlaceholderRegion {
247
247
self . from_index [ placeholder]
248
248
}
249
249
@@ -375,7 +375,7 @@ impl<N: Idx> RegionValues<N> {
375
375
crate fn placeholders_contained_in < ' a > (
376
376
& ' a self ,
377
377
r : N ,
378
- ) -> impl Iterator < Item = ty:: Placeholder > + ' a {
378
+ ) -> impl Iterator < Item = ty:: PlaceholderRegion > + ' a {
379
379
self . placeholders
380
380
. row ( r)
381
381
. into_iter ( )
@@ -432,7 +432,7 @@ impl ToElementIndex for RegionVid {
432
432
}
433
433
}
434
434
435
- impl ToElementIndex for ty:: Placeholder {
435
+ impl ToElementIndex for ty:: PlaceholderRegion {
436
436
fn add_to_row < N : Idx > ( self , values : & mut RegionValues < N > , row : N ) -> bool {
437
437
let index = values. placeholder_indices . lookup_index ( self ) ;
438
438
values. placeholders . insert ( row, index)
0 commit comments