Fix name collisions with test functions and intrinsics (#2123)

There was an unfortunate collision with how test symbols were named and
the various bindings functions exported by wasm-bindgen. This commit
fixes these issues by using a separate prefix for `#[wasm_bindgen_test]`
than other `#[wasm_bindgen]` functions which should avoid the name
clash.

Closes #2121
This commit is contained in:
Alex Crichton
2020-05-04 16:20:41 -05:00
committed by GitHub
parent d896446edc
commit dc54c0fb25
2 changed files with 2 additions and 6 deletions

View File

@ -63,7 +63,7 @@ fn main() -> anyhow::Result<()> {
let mut tests = Vec::new();
for export in wasm.exports.iter() {
if !export.name.starts_with("__wbg_test") {
if !export.name.starts_with("__wbgt_") {
continue;
}
tests.push(export.name.to_string());