@@ -66,15 +66,6 @@ impl<'tcx> LowerInto<'tcx, SubstsRef<'tcx>> for &chalk_ir::Substitution<RustInte
66
66
}
67
67
}
68
68
69
- impl < ' tcx > LowerInto < ' tcx , chalk_ir:: AliasTy < RustInterner < ' tcx > > > for ty:: AliasTy < ' tcx > {
70
- fn lower_into ( self , interner : RustInterner < ' tcx > ) -> chalk_ir:: AliasTy < RustInterner < ' tcx > > {
71
- chalk_ir:: AliasTy :: Projection ( chalk_ir:: ProjectionTy {
72
- associated_ty_id : chalk_ir:: AssocTypeId ( self . def_id ) ,
73
- substitution : self . substs . lower_into ( interner) ,
74
- } )
75
- }
76
- }
77
-
78
69
impl < ' tcx > LowerInto < ' tcx , chalk_ir:: InEnvironment < chalk_ir:: Goal < RustInterner < ' tcx > > > >
79
70
for ChalkEnvironmentAndGoal < ' tcx >
80
71
{
@@ -255,7 +246,10 @@ impl<'tcx> LowerInto<'tcx, chalk_ir::AliasEq<RustInterner<'tcx>>>
255
246
// FIXME(associated_const_equality): teach chalk about terms for alias eq.
256
247
chalk_ir:: AliasEq {
257
248
ty : self . term . ty ( ) . unwrap ( ) . lower_into ( interner) ,
258
- alias : self . projection_ty . lower_into ( interner) ,
249
+ alias : chalk_ir:: AliasTy :: Projection ( chalk_ir:: ProjectionTy {
250
+ associated_ty_id : chalk_ir:: AssocTypeId ( self . projection_ty . def_id ) ,
251
+ substitution : self . projection_ty . substs . lower_into ( interner) ,
252
+ } ) ,
259
253
}
260
254
}
261
255
}
@@ -353,7 +347,12 @@ impl<'tcx> LowerInto<'tcx, chalk_ir::Ty<RustInterner<'tcx>>> for Ty<'tcx> {
353
347
ty:: Tuple ( types) => {
354
348
chalk_ir:: TyKind :: Tuple ( types. len ( ) , types. as_substs ( ) . lower_into ( interner) )
355
349
}
356
- ty:: Alias ( ty:: Projection , proj) => chalk_ir:: TyKind :: Alias ( proj. lower_into ( interner) ) ,
350
+ ty:: Alias ( ty:: Projection , ty:: AliasTy { def_id, substs } ) => {
351
+ chalk_ir:: TyKind :: Alias ( chalk_ir:: AliasTy :: Projection ( chalk_ir:: ProjectionTy {
352
+ associated_ty_id : chalk_ir:: AssocTypeId ( def_id) ,
353
+ substitution : substs. lower_into ( interner) ,
354
+ } ) )
355
+ }
357
356
ty:: Alias ( ty:: Opaque , ty:: AliasTy { def_id, substs } ) => {
358
357
chalk_ir:: TyKind :: Alias ( chalk_ir:: AliasTy :: Opaque ( chalk_ir:: OpaqueTy {
359
358
opaque_ty_id : chalk_ir:: OpaqueTyId ( def_id) ,
0 commit comments