mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-14 05:21:24 +00:00
Merge pull request #955 from alexcrichton/non-send
Ensure that `JsValue` isn't considered `Send`
This commit is contained in:
@ -1042,11 +1042,9 @@ impl ToTokens for ast::ImportStatic {
|
||||
fn init() -> #ty {
|
||||
panic!("cannot access imported statics on non-wasm targets")
|
||||
}
|
||||
static mut _VAL: ::wasm_bindgen::__rt::core::cell::UnsafeCell<Option<#ty>> =
|
||||
::wasm_bindgen::__rt::core::cell::UnsafeCell::new(None);
|
||||
thread_local!(static _VAL: #ty = init(););
|
||||
::wasm_bindgen::JsStatic {
|
||||
__inner: unsafe { &_VAL },
|
||||
__init: init,
|
||||
__inner: &_VAL,
|
||||
}
|
||||
};
|
||||
}).to_tokens(into);
|
||||
|
Reference in New Issue
Block a user