Skip to content

Commit ae71c85

Browse files
committed
---
yaml --- r: 1501 b: refs/heads/master c: 5dba7a7 h: refs/heads/master i: 1499: 8cae90b v: v3
1 parent 7d18226 commit ae71c85

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: da8058ff836a4e9a30e36ef96449dfef576b13e4
2+
refs/heads/master: 5dba7a77d2c7396989262da3de5ea055bed151bc

trunk/src/comp/middle/trans.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,13 +1049,13 @@ fn GEP_tup_like(@block_ctxt cx, @ty.t t,
10491049
bcx = sz.bcx;
10501050
auto raw = bcx.build.PointerCast(base, T_ptr(T_i8()));
10511051
auto bumped = bcx.build.GEP(raw, vec(sz.val));
1052-
alt (s.target.struct) {
1053-
case (ty.ty_param(_)) { ret res(bcx, bumped); }
1054-
case (_) {
1055-
auto ty = T_ptr(type_of(bcx.fcx.ccx, s.target));
1056-
ret res(bcx, bcx.build.PointerCast(bumped, ty));
1057-
}
1052+
1053+
if (ty.type_has_dynamic_size(s.target)) {
1054+
ret res(bcx, bumped);
10581055
}
1056+
1057+
auto typ = T_ptr(type_of(bcx.fcx.ccx, s.target));
1058+
ret res(bcx, bcx.build.PointerCast(bumped, typ));
10591059
}
10601060

10611061

0 commit comments

Comments
 (0)