File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 3f3a121043f72a1662f0b0ad24ca2fd09f4b4f27
2
+ refs/heads/master: daac7a8b130f8f2dfbdeaf38ff39541adfd74736
Original file line number Diff line number Diff line change @@ -379,6 +379,27 @@ fn type_is_scalar(@t ty) -> bool {
379
379
fail;
380
380
}
381
381
382
+ fn type_has_dynamic_size( @t ty) -> bool {
383
+ alt ( ty. struct ) {
384
+ case ( ty_tup( ?ts) ) {
385
+ auto i = 0 u;
386
+ while ( i < _vec. len[ @t] ( ts) ) {
387
+ if ( type_has_dynamic_size( ts. ( i) ) ) { ret true; }
388
+ i += 1 u;
389
+ }
390
+ }
391
+ case ( ty_rec( ?fields) ) {
392
+ auto i = 0 u;
393
+ while ( i < _vec. len[ field] ( fields) ) {
394
+ if ( type_has_dynamic_size( fields. ( i) . ty) ) { ret true; }
395
+ i += 1 u;
396
+ }
397
+ }
398
+ case ( ty_param( _) ) { ret true; }
399
+ case ( _) { /* fall through */ }
400
+ }
401
+ ret false;
402
+ }
382
403
383
404
fn type_is_integral( @t ty) -> bool {
384
405
alt ( ty. struct ) {
You can’t perform that action at this time.
0 commit comments