Created
May 26, 2013 17:22
-
-
Save graue/5653415 to your computer and use it in GitHub Desktop.
Code using `map` that worked in Rust 0.5, but broke in 0.6
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
fn main() { | |
let s = [1, 2, 3, 4].map(|&x| (x * x).to_str()); | |
for s.each |&item| { | |
io::println(item); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Result: it can't figure out which
.to_str()
to call out of 10(!!) candidates:i32
,i16
,int
,u8
,i64
,u64
,u32
,uint
,u16
, ori8
. Possibly fix by adding a type annotation, but is this a Rust bug? Kinda seems like this should work.