Skip to content

Commit 75cadbc

Browse files
committed
---
yaml --- r: 5812 b: refs/heads/master c: 6a78005 h: refs/heads/master v: v3
1 parent 5e7687b commit 75cadbc

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
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: e4c91fdf654957cddcbae279d7e113aa4237bb79
2+
refs/heads/master: 6a7800508b155e96ed358ff861315c9d70110235

trunk/src/comp/middle/trans_objects.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -367,16 +367,10 @@ fn trans_anon_obj(bcx: @block_ctxt, sp: span, anon_obj: ast::anon_obj,
367367
// If inner_obj (the object being extended) exists, translate it.
368368
// Translating inner_obj returns a ValueRef (pointer to a 2-word
369369
// value) wrapped in a result.
370-
let inner_obj_val: result = trans_temp_expr(bcx, e);
371-
372370
check type_is_tup_like(bcx, body_ty);
373-
let body_inner_obj =
374-
GEP_tup_like(bcx, body_ty, body,
375-
[0, abi::obj_body_elt_inner_obj]);
376-
bcx = body_inner_obj.bcx;
377-
bcx =
378-
copy_val(bcx, INIT, body_inner_obj.val, inner_obj_val.val,
379-
inner_obj_ty);
371+
let {bcx: cx, val: body_inner_obj} = GEP_tup_like
372+
(bcx, body_ty, body, [0, abi::obj_body_elt_inner_obj]);
373+
bcx = trans_expr(cx, e, save_in(body_inner_obj));
380374
}
381375
}
382376
revoke_clean(bcx, box);

0 commit comments

Comments
 (0)