test: Modernize and un-XFAIL issue-2242-d.rs (issue #2242)
This commit is contained in:
parent
6a7c714df6
commit
793c0a1116
4 changed files with 7 additions and 9 deletions
|
|
@ -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 }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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} }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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} }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue