提交 f24408d8 编写于 作者: M Marijn Haverbeke

Don't error when trans_lval is called on a non-lval

This allows directly calling a function expression, or the
result of an alt/if/block expression.
上级 6142c731
......@@ -5069,9 +5069,11 @@ fn trans_lval(&@block_ctxt cx, &@ast::expr e) -> lval_result {
}
}
case (_) {
cx.fcx.lcx.ccx.sess.span_unimpl(e.span,
"expr variant in trans_lval: "
+ expr_to_str(e));
ret rec(res=trans_expr(cx, e),
is_mem=false,
generic=none,
llobj=none,
method_ty=none);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册