Skip to content

Commit 255b973

Browse files
committed
---
yaml --- r: 11939 b: refs/heads/master c: e399ddb h: refs/heads/master i: 11937: a24e935 11935: 1e68a20 v: v3
1 parent 9af02c3 commit 255b973

File tree

4 files changed

+9
-25
lines changed

4 files changed

+9
-25
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: f80008f04b9be5aa57d055d57ef1ab77684f4aea
2+
refs/heads/master: e399ddbf179bec4798433b1d839065a7188c0f51
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/rustc/middle/typeck.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2609,8 +2609,10 @@ fn check_expr_with_unifier(fcx: @fn_ctxt, expr: @ast::expr, unify: unifier,
26092609
}
26102610

26112611
let proto = alt proto {
2612-
ast::proto_bare | ast::proto_box { ast::proto_box }
2613-
ast::proto_uniq | ast::proto_any | ast::proto_block {
2612+
ast::proto_bare | ast::proto_box | ast::proto_uniq {
2613+
ast::proto_box
2614+
}
2615+
ast::proto_any | ast::proto_block {
26142616
tcx.sess.span_err(expr.span,
26152617
#fmt["cannot bind %s closures",
26162618
proto_to_str(proto)]);

trunk/src/test/compile-fail/bind-unique-closure.rs

Lines changed: 0 additions & 22 deletions
This file was deleted.

trunk/src/test/run-pass/issue-1899.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fn main()
2+
{
3+
let _b = [bind (fn~() {})()];
4+
}

0 commit comments

Comments
 (0)