We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 587b863 commit 4c9eee8Copy full SHA for 4c9eee8
src/comp/middle/trans.rs
@@ -3823,6 +3823,18 @@ fn trans_landing_pad(bcx: &@block_ctxt) {
3823
let llretval = llpad;
3824
// The landing pad block is a cleanup
3825
SetCleanup(bcx, llpad);
3826
+
3827
+ let bcx = bcx;
3828
+ let scope_cx = bcx;
3829
+ while true {
3830
+ scope_cx = find_scope_cx(scope_cx);
3831
+ bcx = trans_block_cleanups(bcx, scope_cx);
3832
+ scope_cx = alt scope_cx.parent {
3833
+ parent_some(b) { b }
3834
+ parent_none. { break; }
3835
+ };
3836
+ }
3837
3838
// Continue unwinding
3839
Resume(bcx, llretval);
3840
}
src/test/run-fail/unwind-box.rs
@@ -0,0 +1,10 @@
1
+// error-pattern:fail
2
3
+fn failfn() {
4
+ fail;
5
+}
6
7
+fn main() {
8
+ @0;
9
+ failfn();
10
0 commit comments