Skip to content

Commit 1600974

Browse files
committed
Avoid segfault due to fallthrough in base case of incr_all_refcounts. We could use a typestate checker in rustc, any time now.
1 parent 7e01aba commit 1600974

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/comp/middle/trans.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@ fn incr_all_refcnts(@block_ctxt cx,
572572
ret iter_structural_ty(cx, v, t,
573573
bind incr_all_refcnts(_, _, _));
574574
}
575+
ret res(cx, C_nil());
575576
}
576577

577578
fn drop_ty(@block_ctxt cx,

0 commit comments

Comments
 (0)