@@ -220,9 +220,9 @@ 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 (
@@ -246,11 +246,11 @@ 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 (
@@ -274,11 +274,11 @@ 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 (
0 commit comments