]> git.lizzy.rs Git - rust.git/commitdiff
Added an extra check in trans_alt
authorTim Chevalier <chevalier@alum.wellesley.edu>
Fri, 16 Sep 2011 03:32:01 +0000 (20:32 -0700)
committerTim Chevalier <chevalier@alum.wellesley.edu>
Fri, 16 Sep 2011 03:32:01 +0000 (20:32 -0700)
Gratuitous right now, but I'm going to change the type of trans::type_of

src/comp/middle/trans_alt.rs

index 2410cd2ea477e55ff37a667311f8e1c1ae230eca..066f969ba60bf53f7bbbd9aa92dc286e615ec536 100644 (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 =