Created
July 16, 2012 14:10
-
-
Save iamtakingiteasy/3122924 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io::*; | |
import to_str::*; | |
impl <T : to_str copy> of to_str for @[mut T] { | |
fn to_str() -> str { | |
let tmp = self; | |
tmp.map(|x| { x.to_str() }).to_str() | |
} | |
} | |
fn main() { | |
println((@[mut 1, 2, 3]).to_str()); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user@note ~/soft/mine/rust $ rustc example.rs | |
example.rs:7:8: 7:11 error: internal compiler error: aliased ptr with a non-none lp | |
example.rs:7 tmp.map(|x| { x.to_str() }).to_str() | |
^~~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment