Skip to content

Commit 121f5f1

Browse files
committed
---
yaml --- r: 83753 b: refs/heads/try c: e007f94 h: refs/heads/master i: 83751: a9a6b9f v: v3
1 parent 6b31c66 commit 121f5f1

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0e4d1fc8cae42e15e00f71d9f439b01bb25a86ae
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
5-
refs/heads/try: f56cf16b8076ae55cb0160da48330cf76849c752
5+
refs/heads/try: e007f947479fc65cbff0e365ee26d45a9aa908d4
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustc/middle/trans/glue.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ pub fn trans_struct_drop_flag(bcx: @mut Block, t: ty::t, v0: ValueRef, dtor_did:
423423
bcx = drop_ty(bcx, llfld_a, fld.mt.ty);
424424
}
425425

426+
Store(bcx, C_u8(0), drop_flag);
426427
bcx
427428
}
428429
}
@@ -594,6 +595,23 @@ pub fn make_take_glue(bcx: @mut Block, v: ValueRef, t: ty::t) -> @mut Block {
594595
bcx
595596
}
596597
ty::ty_opaque_closure_ptr(_) => bcx,
598+
ty::ty_struct(did, _) => {
599+
let tcx = bcx.tcx();
600+
let bcx = iter_structural_ty(bcx, v, t, take_ty);
601+
602+
match ty::ty_dtor(tcx, did) {
603+
ty::TraitDtor(_, false) => {
604+
// Zero out the struct
605+
unsafe {
606+
let ty = Type::from_ref(llvm::LLVMTypeOf(v));
607+
memzero(&B(bcx), v, ty);
608+
}
609+
610+
}
611+
_ => { }
612+
}
613+
bcx
614+
}
597615
_ if ty::type_is_structural(t) => {
598616
iter_structural_ty(bcx, v, t, take_ty)
599617
}

branches/try/src/libsyntax/print/pprust.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1895,7 +1895,9 @@ pub fn print_view_item(s: @ps, item: &ast::view_item) {
18951895
head(s, "extern mod");
18961896
print_ident(s, id);
18971897
for p in optional_path.iter() {
1898+
space(s.s);
18981899
word(s.s, "=");
1900+
space(s.s);
18991901
print_string(s, *p);
19001902
}
19011903
if !mta.is_empty() {

0 commit comments

Comments
 (0)