Skip to content

Commit e7c8019

Browse files
committed
Kind check tuples. Closes #841.
1 parent 94c6160 commit e7c8019

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/comp/middle/ty.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,13 @@ fn type_kind(cx: &ctxt, ty: &t) -> ast::kind {
10711071
if result == ast::kind_pinned { break; }
10721072
}
10731073
}
1074+
// Tuples lower to the lowest of their members.
1075+
ty_tup(tys) {
1076+
for ty: t in tys {
1077+
result = kind::lower_kind(result, type_kind(cx, ty));
1078+
if result == ast::kind_pinned { break; }
1079+
}
1080+
}
10741081

10751082
// Tags lower to the lowest of their variants.
10761083
ty_tag(did, tps) {

0 commit comments

Comments
 (0)