rustc: Mark tags that have subtypes with dynamic size as dynamic
This commit is contained in:
parent
687d328d7c
commit
8d8b3d985a
1 changed files with 7 additions and 0 deletions
|
|
@ -471,6 +471,13 @@ fn type_has_dynamic_size(@t ty) -> bool {
|
|||
i += 1u;
|
||||
}
|
||||
}
|
||||
case (ty_tag(_, ?subtys)) {
|
||||
auto i = 0u;
|
||||
while (i < _vec.len[@t](subtys)) {
|
||||
if (type_has_dynamic_size(subtys.(i))) { ret true; }
|
||||
i += 1u;
|
||||
}
|
||||
}
|
||||
case (ty_param(_)) { ret true; }
|
||||
case (_) { /* fall through */ }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue