Closed
Description
I try to compile this program in rustc but an internal compile error occurred that:
task <unnamed> failed at 'assertion failed: is_utf8(v)', C:\bot\slave\dist2-win\build\src\libstd\str.rs:1032
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1 to get further details and report the results to github.com/mozilla/rust/issues
task <unnamed> failed at 'explicit failure', c:\bot\slave\dist2-win\build\src\librustc\rustc.rs:391
this is my program:
extern mod extra;
use extra::json::ToJson;
fn main () {
let l = ~[1, 2, 3, 4];
println(l.iter().filter(|&x| *x > 2).map(|&x| x).to_owned_vec().to_json().to_str());
}
This error occurred both in Windows 8.1 64bit and windows XP 32bit.