From 2115cba4ee52099a5fe5611364a69c8b2df99765 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Tue, 28 Feb 2012 10:38:02 +0100 Subject: [PATCH] Bail out of calling tydesc glue in an unreachable context Closes #1901 --- src/comp/middle/trans/base.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/comp/middle/trans/base.rs b/src/comp/middle/trans/base.rs index 0d259d1392e..ded3d737bc5 100644 --- a/src/comp/middle/trans/base.rs +++ b/src/comp/middle/trans/base.rs @@ -1286,6 +1286,7 @@ fn lazily_emit_tydesc_glue(ccx: crate_ctxt, field: int, fn call_tydesc_glue_full(cx: block, v: ValueRef, tydesc: ValueRef, field: int, static_ti: option<@tydesc_info>) { lazily_emit_tydesc_glue(cx.ccx(), field, static_ti); + if cx.unreachable { ret; } let static_glue_fn = none; alt static_ti {