resolve some merge failures
This commit is contained in:
parent
77b06d24cd
commit
7f12358656
@ -243,11 +243,12 @@ fn check_bind(cx: @ctx, f: @expr, args: [option<@expr>]) {
|
||||
for arg in args {
|
||||
alt arg {
|
||||
some(expr) {
|
||||
alt (alt arg_ts[i].mode {
|
||||
let o_msg = alt ty::resolved_mode(cx.tcx, arg_ts[i].mode) {
|
||||
by_mut_ref { some("by mutable reference") }
|
||||
by_move { some("by move") }
|
||||
_ { none }
|
||||
}) {
|
||||
};
|
||||
alt o_msg {
|
||||
some(name) {
|
||||
cx.tcx.sess.span_err(
|
||||
expr.span, "can not bind an argument passed " + name);
|
||||
|
@ -4422,8 +4422,7 @@ fn copy_args_to_allocas(fcx: @fn_ctxt, bcx: @block_ctxt, args: [ast::arg],
|
||||
let epic_fail = fn@() -> ! {
|
||||
tcx.sess.bug("Someone forgot\
|
||||
to document an invariant in copy_args_to_allocas!");
|
||||
}
|
||||
let epic_fail = bind epic_fail_(bcx);
|
||||
};
|
||||
for arg in arg_tys {
|
||||
let id = args[arg_n].id;
|
||||
let argval = alt fcx.llargs.get(id) { local_mem(v) { v }
|
||||
|
@ -2045,11 +2045,7 @@ fn check_expr_with_unifier(fcx: @fn_ctxt, expr: @ast::expr, unify: unifier,
|
||||
// Take the prototype from the expected type, but default to block:
|
||||
let proto = alt ty::struct(tcx, expected) {
|
||||
ty::ty_fn({proto, _}) { proto }
|
||||
_ {
|
||||
tcx.sess.span_warn(expr.span, "unable to infer kind of closure, \
|
||||
defaulting to block");
|
||||
ast::proto_block
|
||||
}
|
||||
_ { ast::proto_box }
|
||||
};
|
||||
#debug("checking expr_fn_block %s expected=%s",
|
||||
expr_to_str(expr),
|
||||
|
Loading…
x
Reference in New Issue
Block a user