File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 1e65baad94ca8ae1f96472bf9efeb8e5ae04cf26
2
+ refs/heads/master: ea2c86874448439a31012ccb141450c67e3d94d8
Original file line number Diff line number Diff line change @@ -1020,9 +1020,17 @@ fn dynamic_size_of(@block_ctxt cx, @ty.t t) -> result {
1020
1020
let ValueRef max_size = bcx. build. Alloca ( T_int ( ) ) ;
1021
1021
bcx. build. Store ( C_int ( 0 ) , max_size) ;
1022
1022
1023
+ auto ty_params = tag_ty_params( bcx. fcx. ccx, tid) ;
1023
1024
auto variants = tag_variants( bcx. fcx. ccx, tid) ;
1024
1025
for ( ast. variant variant in variants) {
1025
- let vec[ @ty. t] tys = variant_types( bcx. fcx. ccx, variant) ;
1026
+ // Perform type substitution on the raw variant types.
1027
+ let vec[ @ty. t] raw_tys = variant_types( bcx. fcx. ccx, variant) ;
1028
+ let vec[ @ty. t] tys = vec( ) ;
1029
+ for ( @ty. t raw_ty in raw_tys) {
1030
+ auto t = ty. substitute_ty_params( ty_params, tps, raw_ty) ;
1031
+ tys += vec( t) ;
1032
+ }
1033
+
1026
1034
auto rslt = align_elements( bcx, tys) ;
1027
1035
bcx = rslt. bcx;
1028
1036
You can’t perform that action at this time.
0 commit comments