use List<Ty<'tcx>> for tuples

This commit is contained in:
lcnr 2022-02-07 16:06:31 +01:00
parent a9c1ab82f5
commit 1245131a11
53 changed files with 128 additions and 170 deletions

View file

@ -90,10 +90,9 @@ fn clif_pair_type_from_ty<'tcx>(
ty: Ty<'tcx>,
) -> Option<(types::Type, types::Type)> {
Some(match ty.kind() {
ty::Tuple(substs) if substs.len() == 2 => {
let mut types = substs.types();
let a = clif_type_from_ty(tcx, types.next().unwrap())?;
let b = clif_type_from_ty(tcx, types.next().unwrap())?;
ty::Tuple(types) if types.len() == 2 => {
let a = clif_type_from_ty(tcx, types[0])?;
let b = clif_type_from_ty(tcx, types[1])?;
if a.is_vector() || b.is_vector() {
return None;
}