File tree 3 files changed +8
-6
lines changed
3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 8
8
* Add clear error message to communicate new feature resolver version requirements.
9
9
[ #4312 ] ( https://github.com/rustwasm/wasm-bindgen/pull/4312 )
10
10
11
+ ### Fixed
12
+
13
+ * Fix macro-hygiene for calls to ` std::thread_local! ` .
14
+ [ #4315 ] ( https://github.com/rustwasm/wasm-bindgen/pull/4315 )
15
+
11
16
--------------------------------------------------------------------------------
12
17
13
18
## [ 0.2.97] ( https://github.com/rustwasm/wasm-bindgen/compare/0.2.96...0.2.97 )
Original file line number Diff line number Diff line change @@ -1711,7 +1711,7 @@ impl ToTokens for ast::ImportStatic {
1711
1711
fn init( ) -> #ty {
1712
1712
#init
1713
1713
}
1714
- thread_local!( static _VAL: #ty = init( ) ; ) ;
1714
+ #wasm_bindgen :: __rt :: std :: thread_local!( static _VAL: #ty = init( ) ; ) ;
1715
1715
#wasm_bindgen:: JsStatic {
1716
1716
__inner: & _VAL,
1717
1717
}
@@ -1763,7 +1763,7 @@ fn thread_local_import(
1763
1763
1764
1764
match thread_local {
1765
1765
ast:: ThreadLocal :: V1 => quote ! {
1766
- thread_local! {
1766
+ #wasm_bindgen :: __rt :: std :: thread_local! {
1767
1767
#[ automatically_derived]
1768
1768
#[ deprecated = "use with `#[wasm_bindgen(thread_local_v2)]` instead" ]
1769
1769
#vis static #name: #actual_ty = {
@@ -1774,7 +1774,7 @@ fn thread_local_import(
1774
1774
ast:: ThreadLocal :: V2 => {
1775
1775
#[ cfg( feature = "std" ) ]
1776
1776
let inner = quote ! {
1777
- thread_local!( static _VAL: #actual_ty = init( ) ; ) ;
1777
+ #wasm_bindgen :: __rt :: std :: thread_local!( static _VAL: #actual_ty = init( ) ; ) ;
1778
1778
#wasm_bindgen:: JsThreadLocal {
1779
1779
__inner: & _VAL,
1780
1780
}
Original file line number Diff line number Diff line change 1
- #[ cfg( feature = "std" ) ]
2
- use std:: prelude:: v1:: * ;
3
-
4
1
use alloc:: boxed:: Box ;
5
2
use alloc:: string:: String ;
6
3
use alloc:: vec:: Vec ;
You can’t perform that action at this time.
0 commit comments