@@ -329,9 +329,13 @@ impl<'tcx> LowerInto<'tcx, chalk_ir::Ty<RustInterner<'tcx>>> for Ty<'tcx> {
329329 ) ,
330330 ty:: GeneratorWitness ( _) => unimplemented ! ( ) ,
331331 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+ ) ,
335339 ty:: Projection ( proj) => chalk_ir:: TyKind :: Alias ( proj. lower_into ( interner) ) ,
336340 ty:: Opaque ( def_id, substs) => {
337341 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>> {
403407 TyKind :: Generator ( ..) => unimplemented ! ( ) ,
404408 TyKind :: GeneratorWitness ( ..) => unimplemented ! ( ) ,
405409 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+ ) ) ,
409413 TyKind :: Slice ( ty) => ty:: Slice ( ty. lower_into ( interner) ) ,
410414 TyKind :: Raw ( mutbl, ty) => ty:: RawPtr ( ty:: TypeAndMut {
411415 ty : ty. lower_into ( interner) ,
0 commit comments