From 2c6eba00dd4b410159d85889beefc6978da41faa Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Thu, 15 Sep 2011 20:32:01 -0700 Subject: [PATCH] Added an extra check in trans_alt Gratuitous right now, but I'm going to change the type of trans::type_of --- src/comp/middle/trans_alt.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/comp/middle/trans_alt.rs b/src/comp/middle/trans_alt.rs index 2410cd2ea47..066f969ba60 100644 --- a/src/comp/middle/trans_alt.rs +++ b/src/comp/middle/trans_alt.rs @@ -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 =