From e7c8019dd9889e1736b075d1b205f8b118b286b3 Mon Sep 17 00:00:00 2001 From: Michael Sullivan Date: Thu, 18 Aug 2011 18:06:00 -0700 Subject: [PATCH] Kind check tuples. Closes #841. --- src/comp/middle/ty.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs index df6b749f52f6..b1c90844e996 100644 --- a/src/comp/middle/ty.rs +++ b/src/comp/middle/ty.rs @@ -1071,6 +1071,13 @@ fn type_kind(cx: &ctxt, ty: &t) -> ast::kind { if result == ast::kind_pinned { break; } } } + // Tuples lower to the lowest of their members. + ty_tup(tys) { + for ty: t in tys { + result = kind::lower_kind(result, type_kind(cx, ty)); + if result == ast::kind_pinned { break; } + } + } // Tags lower to the lowest of their variants. ty_tag(did, tps) {