Skip to content

Commit 5471e18

Browse files
committed
---
yaml --- r: 40807 b: refs/heads/dist-snap c: b07a78b h: refs/heads/master i: 40805: b436043 40803: 72e548e 40799: 32c8d5c v: v3
1 parent 40c223a commit 5471e18

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
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
99
refs/heads/incoming: e90142e536c150df0d9b4b2f11352152177509b5
10-
refs/heads/dist-snap: 9677fff0f9327915b62e4f251d3ad95d2912240d
10+
refs/heads/dist-snap: b07a78b7cbf2d491b616c0a7bbf7f1b0611e4655
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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() {

branches/dist-snap/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
}

branches/dist-snap/src/test/compile-fail/issue-2487-b.rs

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

branches/dist-snap/src/test/compile-fail/issue-2828.rs

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

branches/dist-snap/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)