From 1600974a3a1dc2c2cbdfef6efdc5887a1dc13218 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Fri, 26 Nov 2010 13:03:56 -0800 Subject: [PATCH] Avoid segfault due to fallthrough in base case of incr_all_refcounts. We could use a typestate checker in rustc, any time now. --- src/comp/middle/trans.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 8aaeba5c734..9098d8eb1d7 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -572,6 +572,7 @@ fn incr_all_refcnts(@block_ctxt cx, ret iter_structural_ty(cx, v, t, bind incr_all_refcnts(_, _, _)); } + ret res(cx, C_nil()); } fn drop_ty(@block_ctxt cx,