Skip to content

Commit 728ffa4

Browse files
committed
---
yaml --- r: 5359 b: refs/heads/master c: 432e931 h: refs/heads/master i: 5357: 8869218 5355: 7186120 5351: 4a19c3c 5343: 67ac08a v: v3
1 parent 1328b78 commit 728ffa4

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 3632629acc96b2e3094033de47d6dd311749e112
2+
refs/heads/master: 432e931a2ab6a0e642a39f71b15e86dd3bfe3c9a

trunk/src/comp/middle/trans.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3961,7 +3961,6 @@ fn trans_rec(cx: @block_ctxt, fields: [ast::field],
39613961
let rec_res = alloc_ty(bcx, t);
39623962
let rec_val = rec_res.val;
39633963
bcx = rec_res.bcx;
3964-
add_clean_temp(cx, rec_val, t);
39653964
let i: int = 0;
39663965
let base_val = C_nil();
39673966
alt base {
@@ -4000,6 +3999,7 @@ fn trans_rec(cx: @block_ctxt, fields: [ast::field],
40003999
}
40014000
i += 1;
40024001
}
4002+
add_clean_temp(cx, rec_val, t);
40034003
ret rslt(bcx, rec_val);
40044004
}
40054005

trunk/src/test/run-fail/unwind-rec.rs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// error-pattern:fail
2+
3+
fn build() -> [int] {
4+
fail;
5+
}
6+
7+
fn main() {
8+
let blk = {
9+
node: build()
10+
};
11+
}

0 commit comments

Comments
 (0)