Closed
Description
I was in progress porting handlebars to webassembly. And got this issue, only on asmjs and wasm32.
thread 'main' panicked at 'assertion failed: !ptr.is_null()', /buildslave/rust-buildbot/slave/nightly-dist-rustc-cross-rustbuild-linux/build/src/libpanic_unwind/emcc.rs:33
note: Run with `RUST_BACKTRACE=1` for a backtrace.
/home/nsun/tmp/hbs-test/target/asmjs-unknown-emscripten/debug/hbs-test.js:110
throw ex;
^
5390400
Here is a minimum source file to reproduce this issue:
let replace = Regex::new(">|<|\"|&").unwrap();
let result = replace.replace_all("<html>", |cap: &Captures| {
match cap.at(0) {
Some("<") => "<".to_owned(),
Some(">") => ">".to_owned(),
Some("\"") => """.to_owned(),
Some("&") => "&".to_owned(),
_ => "".to_owned(),
}
});
println!("{}", result);
My rustc: rustc 1.15.0-nightly (71c06a56a 2016-12-18)
Metadata
Metadata
Assignees
Labels
No labels