Added an extra check in trans_alt

Gratuitous right now, but I'm going to change the type of trans::type_of
This commit is contained in:
Tim Chevalier 2011-09-15 20:32:01 -07:00
parent f41f75fe53
commit 2c6eba00dd

View file

@ -576,6 +576,7 @@ fn bind_irrefutable_pat(bcx: @block_ctxt, pat: @ast::pat, val: ValueRef,
// FIXME: Could constrain pat_bind to make this
// check unnecessary.
check (type_has_static_size(ccx, ty));
check non_ty_var(ccx, ty);
let llty = trans::type_of(ccx, pat.span, ty);
let alloc = trans::alloca(bcx, llty);
bcx =