Skip to content

Commit 319d97c

Browse files
committed
---
yaml --- r: 35519 b: refs/heads/master c: b07a78b h: refs/heads/master i: 35517: 7b227e2 35515: 4296b6f 35511: 5d9d9dc 35503: 3b89daa 35487: 2f6041c 35455: fdecfd9 v: v3
1 parent b2ff4f5 commit 319d97c

File tree

6 files changed

+8
-90
lines changed

6 files changed

+8
-90
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: 9677fff0f9327915b62e4f251d3ad95d2912240d
2+
refs/heads/master: b07a78b7cbf2d491b616c0a7bbf7f1b0611e4655
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024

trunk/src/test/compile-fail/block-arg-used-as-lambda-with-illegal-cap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fn to_lambda1(f: fn@(uint) -> uint) -> fn@(uint) -> uint {
1313
}
1414

1515
fn to_lambda2(b: fn(uint) -> uint) -> fn@(uint) -> uint {
16-
return to_lambda1({|x| b(x)}); //~ ERROR value may contain borrowed pointers
16+
return to_lambda1({|x| b(x)}); //~ ERROR illegal move from argument `b`
1717
}
1818

1919
fn main() {

trunk/src/test/compile-fail/copy-into-closure.rs

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,42 +8,23 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
fn closure1(+x: ~str) -> (~str, fn@() -> ~str) {
12-
let f = fn@() -> ~str {
13-
copy x
14-
//~^ WARNING implicitly copying a non-implicitly-copyable value
15-
//~^^ NOTE to copy values into a @fn closure, use a capture clause
16-
};
17-
(move x,f)
18-
}
19-
2011
fn closure2(+x: util::NonCopyable) -> (util::NonCopyable,
2112
fn@() -> util::NonCopyable) {
22-
let f = fn@() -> util::NonCopyable {
23-
copy x
13+
let f = fn@(copy x) -> util::NonCopyable {
2414
//~^ ERROR copying a noncopyable value
2515
//~^^ NOTE non-copyable value cannot be copied into a @fn closure
26-
//~^^^ ERROR copying a noncopyable value
16+
copy x
17+
//~^ ERROR copying a noncopyable value
2718
};
2819
(move x,f)
2920
}
3021
fn closure3(+x: util::NonCopyable) {
31-
do task::spawn {
32-
let s = copy x;
22+
do task::spawn |copy x| {
3323
//~^ ERROR copying a noncopyable value
3424
//~^^ NOTE non-copyable value cannot be copied into a ~fn closure
35-
//~^^^ ERROR copying a noncopyable value
36-
error!("%?", s);
25+
error!("%?", x);
3726
}
3827
error!("%?", x);
3928
}
4029
fn main() {
41-
let x = ~"hello";
42-
do task::spawn {
43-
let s = copy x;
44-
//~^ WARNING implicitly copying a non-implicitly-copyable value
45-
//~^^ NOTE to copy values into a ~fn closure, use a capture clause
46-
error!("%s from child", s);
47-
}
48-
error!("%s", x);
4930
}

trunk/src/test/compile-fail/issue-2487-b.rs

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

trunk/src/test/compile-fail/issue-2828.rs

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

trunk/src/test/compile-fail/no-capture-arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern: copying a noncopyable value
11+
// error-pattern: use of moved variable
1212

1313
extern mod std;
1414
use std::arc;

0 commit comments

Comments
 (0)