Skip to content

Commit 2115cba

Browse files
committed
Bail out of calling tydesc glue in an unreachable context
Closes #1901
1 parent 1fd9aba commit 2115cba

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/comp/middle/trans/base.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,7 @@ fn lazily_emit_tydesc_glue(ccx: crate_ctxt, field: int,
12861286
fn call_tydesc_glue_full(cx: block, v: ValueRef, tydesc: ValueRef,
12871287
field: int, static_ti: option<@tydesc_info>) {
12881288
lazily_emit_tydesc_glue(cx.ccx(), field, static_ti);
1289+
if cx.unreachable { ret; }
12891290

12901291
let static_glue_fn = none;
12911292
alt static_ti {

0 commit comments

Comments
 (0)