Skip to content

Commit 8d8b3d9

Browse files
committed
rustc: Mark tags that have subtypes with dynamic size as dynamic
1 parent 687d328 commit 8d8b3d9

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
@@ -471,6 +471,13 @@ fn type_has_dynamic_size(@t ty) -> bool {
471471
i += 1u;
472472
}
473473
}
474+
case (ty_tag(_, ?subtys)) {
475+
auto i = 0u;
476+
while (i < _vec.len[@t](subtys)) {
477+
if (type_has_dynamic_size(subtys.(i))) { ret true; }
478+
i += 1u;
479+
}
480+
}
474481
case (ty_param(_)) { ret true; }
475482
case (_) { /* fall through */ }
476483
}

0 commit comments

Comments
 (0)