test: Modernize and un-XFAIL issue-2242-d.rs (issue #2242)

This commit is contained in:
Patrick Walton 2012-08-06 21:40:49 -07:00
parent 6a7c714df6
commit 793c0a1116
4 changed files with 7 additions and 9 deletions

View file

@ -2,9 +2,9 @@
#[crate_type = "lib"];
trait to_str {
fn to_str() -> str;
fn to_str() -> ~str;
}
impl of to_str for str {
fn to_str() -> str { self }
impl of to_str for ~str {
fn to_str() -> ~str { self }
}

View file

@ -5,5 +5,5 @@ use a;
import a::to_str;
impl of to_str for int {
fn to_str() -> str { fmt!{"%?", self} }
fn to_str() -> ~str { fmt!{"%?", self} }
}

View file

@ -6,5 +6,5 @@ use a;
import a::to_str;
impl of to_str for bool {
fn to_str() -> str { fmt!{"%b", self} }
fn to_str() -> ~str { fmt!{"%b", self} }
}

View file

@ -1,4 +1,3 @@
// xfail-test
// aux-build:issue_2242_a.rs
// aux-build:issue_2242_b.rs
// aux-build:issue_2242_c.rs
@ -7,11 +6,10 @@ use a;
use b;
use c;
import b::to_str;
import c::to_str;
import a::to_str;
fn main() {
io::println("foo".to_str());
io::println((~"foo").to_str());
io::println(1.to_str());
io::println(true.to_str());
}