Skip to content

Commit 793c0a1

Browse files
committed
test: Modernize and un-XFAIL issue-2242-d.rs (issue #2242)
1 parent 6a7c714 commit 793c0a1

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

src/test/auxiliary/issue_2242_a.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
#[crate_type = "lib"];
33

44
trait to_str {
5-
fn to_str() -> str;
5+
fn to_str() -> ~str;
66
}
77

8-
impl of to_str for str {
9-
fn to_str() -> str { self }
8+
impl of to_str for ~str {
9+
fn to_str() -> ~str { self }
1010
}

src/test/auxiliary/issue_2242_b.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ use a;
55
import a::to_str;
66

77
impl of to_str for int {
8-
fn to_str() -> str { fmt!{"%?", self} }
8+
fn to_str() -> ~str { fmt!{"%?", self} }
99
}

src/test/auxiliary/issue_2242_c.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ use a;
66
import a::to_str;
77

88
impl of to_str for bool {
9-
fn to_str() -> str { fmt!{"%b", self} }
9+
fn to_str() -> ~str { fmt!{"%b", self} }
1010
}

src/test/run-pass/issue-2242-d.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// xfail-test
21
// aux-build:issue_2242_a.rs
32
// aux-build:issue_2242_b.rs
43
// aux-build:issue_2242_c.rs
@@ -7,11 +6,10 @@ use a;
76
use b;
87
use c;
98

10-
import b::to_str;
11-
import c::to_str;
9+
import a::to_str;
1210

1311
fn main() {
14-
io::println("foo".to_str());
12+
io::println((~"foo").to_str());
1513
io::println(1.to_str());
1614
io::println(true.to_str());
1715
}

0 commit comments

Comments
 (0)