Skip to content

Commit 2c6eba0

Browse files
committed
Added an extra check in trans_alt
Gratuitous right now, but I'm going to change the type of trans::type_of
1 parent f41f75f commit 2c6eba0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/comp/middle/trans_alt.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ fn bind_irrefutable_pat(bcx: @block_ctxt, pat: @ast::pat, val: ValueRef,
576576
// FIXME: Could constrain pat_bind to make this
577577
// check unnecessary.
578578
check (type_has_static_size(ccx, ty));
579+
check non_ty_var(ccx, ty);
579580
let llty = trans::type_of(ccx, pat.span, ty);
580581
let alloc = trans::alloca(bcx, llty);
581582
bcx =

0 commit comments

Comments
 (0)