Skip to content

Commit 3c21cf1

Browse files
committed
---
yaml --- r: 20830 b: refs/heads/snap-stage3 c: c076d3c h: refs/heads/master v: v3
1 parent 88ac928 commit 3c21cf1

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: e430a699f2c60890d9b86069fd0c68a70ece7120
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 16a0f72f8ca85b1e2a1b69043dc16c6cf20cc83f
4+
refs/heads/snap-stage3: c076d3ccc0a0cfc9dc61c4a3cac9ae358781f7d5
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/rustc/middle/trans/base.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3452,7 +3452,17 @@ fn trans_struct(block_context: block, span: span, fields: ~[ast::field],
34523452
}
34533453
}
34543454

3455-
let dest = GEPi(block_context, dest_address, ~[0, index]);
3455+
// If the class has a destructor, our GEP is a little more
3456+
// complicated.
3457+
let dest;
3458+
if ty::ty_dtor(block_context.tcx(), class_id).is_some() {
3459+
dest = GEPi(block_context,
3460+
GEPi(block_context, dest_address, ~[0, 1]),
3461+
~[0, index]);
3462+
} else {
3463+
dest = GEPi(block_context, dest_address, ~[0, index]);
3464+
}
3465+
34563466
block_context = trans_expr_save_in(block_context,
34573467
field.node.expr,
34583468
dest);

0 commit comments

Comments
 (0)