Skip to content

Commit 6c0845c

Browse files
committed
---
yaml --- r: 55198 b: refs/heads/snap-stage3 c: 89f4193 h: refs/heads/master v: v3
1 parent 9c649b3 commit 6c0845c

26 files changed

+142
-300
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 5f13e9ccc2e3328d4cd8ca49f84e6840dd998346
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: c1ea72d88fb9739ae82a6e5a2f0bf9bbf9838558
4+
refs/heads/snap-stage3: 89f419370c543a8d3bc905c638c60c293401b0fa
55
refs/heads/try: 8eb2bab100b42f0ba751552d8eff00eb2134c55a
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/test/auxiliary/issue-2196-a.rs

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

branches/snap-stage3/src/test/auxiliary/issue-2196-b.rs

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

branches/snap-stage3/src/test/auxiliary/issue-2196-c.rc

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

branches/snap-stage3/src/test/auxiliary/issue-2196-d.rs

Whitespace-only changes.

branches/snap-stage3/src/test/auxiliary/issue2378a.rs

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

11+
#[link (name = "issue2378a")];
12+
#[crate_type = "lib"];
13+
1114
enum maybe<T> { just(T), nothing }
1215

13-
impl copy> for maybe<T> for methods<T {
14-
fn ~[](idx: uint) -> T {
16+
impl <T:Copy> Index<uint,T> for maybe<T> {
17+
fn index(&self, idx: &uint) -> T {
1518
match self {
16-
just(t) { t }
17-
nothing { fail!(); }
19+
&just(ref t) => copy *t,
20+
&nothing => { fail!(); }
1821
}
1922
}
2023
}

branches/snap-stage3/src/test/auxiliary/issue2378b.rs

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

11-
use issue2378a;
11+
#[link (name = "issue2378b")];
12+
#[crate_type = "lib"];
13+
14+
extern mod issue2378a;
1215

1316
use issue2378a::maybe;
14-
use issue2378a::methods;
1517

16-
type two_maybes<T> = {a: maybe<T>, b: maybe<T>};
18+
struct two_maybes<T> {a: maybe<T>, b: maybe<T>}
1719

18-
impl copy> for two_maybes<T> for methods<T {
19-
fn ~[](idx: uint) -> (T, T) {
20-
(self.a[idx], self.b[idx])
20+
impl <T:Copy> Index<uint,(T,T)> for two_maybes<T> {
21+
fn index(&self, idx: &uint) -> (T, T) {
22+
(self.a[*idx], self.b[*idx])
2123
}
2224
}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -8,7 +8,13 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use b::d;
1211

13-
type t = uint;
1412

13+
// error-pattern:unresolved enum variant
14+
15+
fn main() {
16+
let z = match 3 {
17+
x() => x
18+
};
19+
assert_eq!(z,3);
20+
}

branches/snap-stage3/src/test/run-pass/issue-1466.rs

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

branches/snap-stage3/src/test/run-pass/issue-1989.rs

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

branches/snap-stage3/src/test/run-pass/issue-2185.rs

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

11-
// xfail-test FIXME #2263
11+
// does the second one subsume the first?
12+
// xfail-test
1213
// xfail-fast
14+
15+
// notes on this test case:
16+
// On Thu, Apr 18, 2013 at 6:30 PM, John Clements <[email protected]> wrote:
17+
// the "issue-2185.rs" test was xfailed with a ref to #2263. Issue #2263 is now fixed, so I tried it again, and after adding some &self parameters, I got this error:
18+
//
19+
// Running /usr/local/bin/rustc:
20+
// issue-2185.rs:24:0: 26:1 error: conflicting implementations for a trait
21+
// issue-2185.rs:24 impl iterable<uint> for @fn(&fn(uint)) {
22+
// issue-2185.rs:25 fn iter(&self, blk: &fn(v: uint)) { self( |i| blk(i) ) }
23+
// issue-2185.rs:26 }
24+
// issue-2185.rs:20:0: 22:1 note: note conflicting implementation here
25+
// issue-2185.rs:20 impl<A> iterable<A> for @fn(&fn(A)) {
26+
// issue-2185.rs:21 fn iter(&self, blk: &fn(A)) { self(blk); }
27+
// issue-2185.rs:22 }
28+
//
29+
// … so it looks like it's just not possible to implement both the generic iterable<uint> and iterable<A> for the type iterable<uint>. Is it okay if I just remove this test?
30+
//
31+
// but Niko responded:
32+
// think it's fine to remove this test, just because it's old and cruft and not hard to reproduce. *However* it should eventually be possible to implement the same interface for the same type multiple times with different type parameters, it's just that our current trait implementation has accidental limitations.
33+
34+
// so I'm leaving it in.
35+
// actually, it looks like this is related to bug #3429. I'll rename this bug.
36+
1337
// This test had to do with an outdated version of the iterable trait.
1438
// However, the condition it was testing seemed complex enough to
1539
// warrant still having a test, so I inlined the old definitions.
1640

1741
trait iterable<A> {
18-
fn iter(blk: &fn(A));
42+
fn iter(&self, blk: &fn(A));
1943
}
2044

2145
impl<A> iterable<A> for @fn(&fn(A)) {
22-
fn iter(blk: &fn(A)) { self(blk); }
46+
fn iter(&self, blk: &fn(A)) { self(blk); }
2347
}
2448

2549
impl iterable<uint> for @fn(&fn(uint)) {
26-
fn iter(blk: &fn(&&v: uint)) { self( |i| blk(i) ) }
50+
fn iter(&self, blk: &fn(v: uint)) { self( |i| blk(i) ) }
2751
}
2852

2953
fn filter<A,IA:iterable<A>>(self: IA, prd: @fn(A) -> bool, blk: &fn(A)) {

branches/snap-stage3/src/test/run-pass/issue-2196.rs

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

branches/snap-stage3/src/test/run-pass/issue-2869.rs

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

branches/snap-stage3/src/test/run-pass/issue-3480.rs

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

branches/snap-stage3/src/test/run-pass/issue-3979-generics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl Positioned<int> for Point {
3232
}
3333
}
3434

35-
impl Point: Movable<int, int>;
35+
impl Movable<int, int> for Point;
3636

3737
pub fn main() {
3838
let p = Point{ x: 1, y: 2};

branches/snap-stage3/src/test/run-pass/issue2378c.rs

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

11-
// xfail-test -- #2378 unfixed
1211
// aux-build:issue2378a.rs
1312
// aux-build:issue2378b.rs
13+
// xfail-fast - check-fast doesn't understand aux-build
1414

15-
use issue2378a;
16-
use issue2378b;
15+
extern mod issue2378a;
16+
extern mod issue2378b;
1717

18-
use issue2378a::{just, methods};
19-
use issue2378b::{methods};
18+
use issue2378a::{just};
19+
use issue2378b::{two_maybes};
2020

2121
pub fn main() {
22-
let x = {a: just(3), b: just(5)};
22+
let x = two_maybes{a: just(3), b: just(5)};
2323
assert!(x[0u] == (3, 5));
2424
}

branches/snap-stage3/src/test/run-pass/mlist-cycle.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,18 @@
1010

1111
// xfail-test
1212
// -*- rust -*-
13-
extern mod std;
13+
extern mod core;
14+
use core::gc;
15+
use core::gc::rustrt;
1416

15-
type cell = {c: @list};
17+
struct cell {c: @list}
1618

1719
enum list { link(@mut cell), nil, }
1820

1921
pub fn main() {
20-
let first: @cell = @mut {c: @nil()};
21-
let second: @cell = @mut {c: @link(first)};
22+
let first: @cell = @mut cell{c: @nil()};
23+
let second: @cell = @mut cell{c: @link(first)};
2224
first._0 = @link(second);
23-
sys.rustrt.gc();
24-
let third: @cell = @mut {c: @nil()};
25+
rustrt::gc();
26+
let third: @cell = @mut cell{c: @nil()};
2527
}

branches/snap-stage3/src/test/run-pass/preempt.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
fn starve_main(alive: chan<int>) {
1515
debug!("signalling main");
16-
alive <| 1;
16+
alive.recv(1);
1717
debug!("starving main");
1818
let i: int = 0;
1919
loop { i += 1; }
@@ -22,10 +22,12 @@ fn starve_main(alive: chan<int>) {
2222
pub fn main() {
2323
let alive: port<int> = port();
2424
debug!("main started");
25-
let s: task = spawn starve_main(chan(alive));
25+
let s: task = do task::spawn {
26+
starve_main(chan(alive));
27+
};
2628
let i: int;
2729
debug!("main waiting for alive signal");
28-
alive |> i;
30+
alive.send(i);
2931
debug!("main got alive signal");
3032
while i < 50 { debug!("main iterated"); i += 1; }
3133
debug!("main completed");

0 commit comments

Comments
 (0)