Skip to content

Commit 20f6ccf

Browse files
committed
---
yaml --- r: 15818 b: refs/heads/try c: 7df7a9d h: refs/heads/master v: v3
1 parent 2f2f145 commit 20f6ccf

File tree

5 files changed

+26
-8
lines changed

5 files changed

+26
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 8448711534904cabae76795bf771e0275365c8ef
5+
refs/heads/try: 7df7a9d8ac29f2e9498e109c16ba4c9241b4c1ae
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/test/run-pass/conditional-compile.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@ enum tg { foo, }
2525
enum tg { bar, }
2626

2727
#[cfg(bogus)]
28-
resource r(i: int) { }
28+
class r {
29+
new(i:int) {}
30+
}
2931

30-
resource r(i: int) { }
32+
class r {
33+
new(i:int) {}
34+
}
3135

3236
#[cfg(bogus)]
3337
mod m {

branches/try/src/test/run-pass/init-res-into-things.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
// Resources can't be copied, but storing into data structures counts
22
// as a move unless the stored thing is used afterwards.
33

4-
resource r(i: @mut int) {
5-
*i = *i + 1;
4+
class r {
5+
let i: @mut int;
6+
new(i: @mut int) {
7+
self.i = i;
8+
}
9+
drop { *(self.i) = *(self.i) + 1; }
610
}
711

812
fn test_box() {

branches/try/src/test/run-pass/issue-979.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
resource r(b: @mut int) {
2-
*b += 1;
1+
class r {
2+
let b: @mut int;
3+
new(b: @mut int) {
4+
self.b = b;
5+
}
6+
drop { *(self.b) += 1; }
37
}
48

59
fn main() {

branches/try/src/test/run-pass/resource-assign-is-not-copy.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
resource r(i: @mut int) { *i += 1; }
1+
class r {
2+
let i: @mut int;
3+
new(i: @mut int) {
4+
self.i = i;
5+
}
6+
drop { *(self.i) += 1; }
7+
}
28

39
fn main() {
410
let i = @mut 0;

0 commit comments

Comments
 (0)