Skip to content

Commit 7f12358

Browse files
committed
resolve some merge failures
1 parent 77b06d2 commit 7f12358

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

src/comp/middle/mut.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,12 @@ fn check_bind(cx: @ctx, f: @expr, args: [option<@expr>]) {
243243
for arg in args {
244244
alt arg {
245245
some(expr) {
246-
alt (alt arg_ts[i].mode {
246+
let o_msg = alt ty::resolved_mode(cx.tcx, arg_ts[i].mode) {
247247
by_mut_ref { some("by mutable reference") }
248248
by_move { some("by move") }
249249
_ { none }
250-
}) {
250+
};
251+
alt o_msg {
251252
some(name) {
252253
cx.tcx.sess.span_err(
253254
expr.span, "can not bind an argument passed " + name);

src/comp/middle/trans/base.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4422,8 +4422,7 @@ fn copy_args_to_allocas(fcx: @fn_ctxt, bcx: @block_ctxt, args: [ast::arg],
44224422
let epic_fail = fn@() -> ! {
44234423
tcx.sess.bug("Someone forgot\
44244424
to document an invariant in copy_args_to_allocas!");
4425-
}
4426-
let epic_fail = bind epic_fail_(bcx);
4425+
};
44274426
for arg in arg_tys {
44284427
let id = args[arg_n].id;
44294428
let argval = alt fcx.llargs.get(id) { local_mem(v) { v }

src/comp/middle/typeck.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2045,11 +2045,7 @@ fn check_expr_with_unifier(fcx: @fn_ctxt, expr: @ast::expr, unify: unifier,
20452045
// Take the prototype from the expected type, but default to block:
20462046
let proto = alt ty::struct(tcx, expected) {
20472047
ty::ty_fn({proto, _}) { proto }
2048-
_ {
2049-
tcx.sess.span_warn(expr.span, "unable to infer kind of closure, \
2050-
defaulting to block");
2051-
ast::proto_block
2052-
}
2048+
_ { ast::proto_box }
20532049
};
20542050
#debug("checking expr_fn_block %s expected=%s",
20552051
expr_to_str(expr),

0 commit comments

Comments
 (0)