@@ -329,9 +329,13 @@ impl<'tcx> LowerInto<'tcx, chalk_ir::Ty<RustInterner<'tcx>>> for Ty<'tcx> {
329
329
) ,
330
330
ty:: GeneratorWitness ( _) => unimplemented ! ( ) ,
331
331
ty:: Never => chalk_ir:: TyKind :: Never ,
332
- ty:: Tuple ( types) => {
333
- chalk_ir:: TyKind :: Tuple ( types. len ( ) , types. as_substs ( ) . lower_into ( interner) )
334
- }
332
+ ty:: Tuple ( types) => chalk_ir:: TyKind :: Tuple (
333
+ types. len ( ) ,
334
+ chalk_ir:: Substitution :: from_iter (
335
+ interner,
336
+ types. iter ( ) . map ( |ty| ty:: subst:: GenericArg :: from ( ty) . lower_into ( interner) ) ,
337
+ ) ,
338
+ ) ,
335
339
ty:: Projection ( proj) => chalk_ir:: TyKind :: Alias ( proj. lower_into ( interner) ) ,
336
340
ty:: Opaque ( def_id, substs) => {
337
341
chalk_ir:: TyKind :: Alias ( chalk_ir:: AliasTy :: Opaque ( chalk_ir:: OpaqueTy {
@@ -403,9 +407,9 @@ impl<'tcx> LowerInto<'tcx, Ty<'tcx>> for &chalk_ir::Ty<RustInterner<'tcx>> {
403
407
TyKind :: Generator ( ..) => unimplemented ! ( ) ,
404
408
TyKind :: GeneratorWitness ( ..) => unimplemented ! ( ) ,
405
409
TyKind :: Never => ty:: Never ,
406
- TyKind :: Tuple ( _len, substitution) => {
407
- ty :: Tuple ( substitution. lower_into ( interner) . try_as_type_list ( ) . unwrap ( ) )
408
- }
410
+ TyKind :: Tuple ( _len, substitution) => ty :: Tuple ( interner . tcx . mk_type_list (
411
+ substitution. iter ( interner) . map ( |subst| subst . lower_into ( interner ) . expect_ty ( ) ) ,
412
+ ) ) ,
409
413
TyKind :: Slice ( ty) => ty:: Slice ( ty. lower_into ( interner) ) ,
410
414
TyKind :: Raw ( mutbl, ty) => ty:: RawPtr ( ty:: TypeAndMut {
411
415
ty : ty. lower_into ( interner) ,
0 commit comments