Closed
Description
fn main() {
let v = {
let s = ~"foo bar";
s.word_iter().collect::<~[&str]>()
};
println(v.to_str());
}
// prints [foo, , ^@]
Changing the v.to_str()
to fmt!("%?", v)
still compiles and outputs
rust: task failed at 'left: 0 does not equal right: 128', /home/huon/rust/src/libstd/str.rs:1727
rust: domain main @0x25ba1b0 root task failed