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.
This commit is contained in:
parent
6142c731a0
commit
f24408d89a
1 changed files with 5 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue