Skip to content

Commit bba3cab

Browse files
committed
---
yaml --- r: 11058 b: refs/heads/master c: 7f12358 h: refs/heads/master v: v3
1 parent 94719ad commit bba3cab

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 77b06d24cd76bf808138f1f7df4dcff40260ff38
2+
refs/heads/master: 7f12358656ed3e3d657191bc19d08a4d6a0ef674
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/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);

trunk/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 }

trunk/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)