Fix name of "current thread ID" intrinsic

This was accidentally renamed in the transition to `walrus`, but
upstream rust-lang/rust still uses the old name so let's switch back to
that.
This commit is contained in:
Alex Crichton
2019-03-01 09:22:30 -08:00
parent 18440a562e
commit 9ac8a974a9

View File

@ -388,9 +388,9 @@ fn implement_thread_intrinsics(module: &mut Module, globals: &Globals) -> Result
let ty = module.types.get(function.ty()); let ty = module.types.get(function.ty());
match &import.name[..] { match &import.name[..] {
"__wbindgen_thread_id" => { "__wbindgen_current_id" => {
if !ty.params().is_empty() || ty.results() != &[ValType::I32] { if !ty.params().is_empty() || ty.results() != &[ValType::I32] {
bail!("`__wbindgen_thread_id` intrinsic has the wrong signature"); bail!("`__wbindgen_current_id` intrinsic has the wrong signature");
} }
map.insert(function.id(), Intrinsic::GetThreadId); map.insert(function.id(), Intrinsic::GetThreadId);
} }