@@ -220,17 +220,17 @@ struct UCollector<'q> {
220
220
impl < ' q > DefaultTypeFolder for UCollector < ' q > { }
221
221
222
222
impl < ' q > UniversalFolder for UCollector < ' q > {
223
- fn fold_free_universal_ty ( & mut self , universe : UniverseIndex , _binders : usize ) -> Fallible < Ty > {
224
- self . universes . add ( universe) ;
225
- Ok ( TypeName :: ForAll ( universe) . to_ty ( ) )
223
+ fn fold_free_universal_ty ( & mut self , universe : UniversalIndex , _binders : usize ) -> Fallible < Ty > {
224
+ self . universes . add ( universe. ui ) ;
225
+ Ok ( universe. to_ty ( ) )
226
226
}
227
227
228
228
fn fold_free_universal_lifetime (
229
229
& mut self ,
230
- universe : UniverseIndex ,
230
+ universe : UniversalIndex ,
231
231
_binders : usize ,
232
232
) -> Fallible < Lifetime > {
233
- self . universes . add ( universe) ;
233
+ self . universes . add ( universe. ui ) ;
234
234
Ok ( universe. to_lifetime ( ) )
235
235
}
236
236
}
@@ -246,20 +246,20 @@ impl<'q> DefaultTypeFolder for UMapToCanonical<'q> {}
246
246
impl < ' q > UniversalFolder for UMapToCanonical < ' q > {
247
247
fn fold_free_universal_ty (
248
248
& mut self ,
249
- universe0 : UniverseIndex ,
249
+ universe0 : UniversalIndex ,
250
250
_binders : usize ,
251
251
) -> Fallible < Ty > {
252
- let universe = self . universes . map_universe_to_canonical ( universe0) ;
253
- Ok ( TypeName :: ForAll ( universe ) . to_ty ( ) )
252
+ let ui = self . universes . map_universe_to_canonical ( universe0. ui ) ;
253
+ Ok ( UniversalIndex { ui , idx : universe0 . idx } . to_ty ( ) )
254
254
}
255
255
256
256
fn fold_free_universal_lifetime (
257
257
& mut self ,
258
- universe0 : UniverseIndex ,
258
+ universe0 : UniversalIndex ,
259
259
_binders : usize ,
260
260
) -> Fallible < Lifetime > {
261
- let universe = self . universes . map_universe_to_canonical ( universe0) ;
262
- Ok ( universe. to_lifetime ( ) )
261
+ let universe = self . universes . map_universe_to_canonical ( universe0. ui ) ;
262
+ Ok ( UniversalIndex { ui : universe, idx : universe0 . idx } . to_lifetime ( ) )
263
263
}
264
264
}
265
265
@@ -274,20 +274,20 @@ impl<'q> DefaultTypeFolder for UMapFromCanonical<'q> {}
274
274
impl < ' q > UniversalFolder for UMapFromCanonical < ' q > {
275
275
fn fold_free_universal_ty (
276
276
& mut self ,
277
- universe0 : UniverseIndex ,
277
+ universe0 : UniversalIndex ,
278
278
_binders : usize ,
279
279
) -> Fallible < Ty > {
280
- let universe = self . universes . map_universe_from_canonical ( universe0) ;
281
- Ok ( TypeName :: ForAll ( universe ) . to_ty ( ) )
280
+ let ui = self . universes . map_universe_from_canonical ( universe0. ui ) ;
281
+ Ok ( UniversalIndex { ui , idx : universe0 . idx } . to_ty ( ) )
282
282
}
283
283
284
284
fn fold_free_universal_lifetime (
285
285
& mut self ,
286
- universe0 : UniverseIndex ,
286
+ universe0 : UniversalIndex ,
287
287
_binders : usize ,
288
288
) -> Fallible < Lifetime > {
289
- let universe = self . universes . map_universe_from_canonical ( universe0) ;
290
- Ok ( universe. to_lifetime ( ) )
289
+ let universe = self . universes . map_universe_from_canonical ( universe0. ui ) ;
290
+ Ok ( UniversalIndex { ui : universe, idx : universe0 . idx } . to_lifetime ( ) )
291
291
}
292
292
}
293
293
0 commit comments