From 71f058499a0e551d2b8deb5d098bdb04387dc021 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 24 Mar 2011 21:04:29 -0400 Subject: Refactor ast.local to make room for initialization via recv --- src/comp/middle/trans.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/comp/middle/trans.rs') diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index a65bb284..5c7c8ff7 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -4869,8 +4869,8 @@ fn init_local(@block_ctxt cx, @ast.local local) -> result { vec(clean(bind drop_slot(_, llptr, ty))); alt (local.init) { - case (some[@ast.expr](?e)) { - auto sub = trans_expr(bcx, e); + case (some[ast.initializer](?init)) { + auto sub = trans_expr(bcx, init.expr); bcx = copy_ty(sub.bcx, INIT, llptr, sub.val, ty).bcx; } case (_) { -- cgit v1.2.3