File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ impl Default for TimerHandle {
277277 // handle which will return errors when timer objects are attempted to
278278 // be associated.
279279 if fallback == 0 {
280- #[ cfg( not( feature = "wasm-bindgen " ) ) ]
280+ #[ cfg( not( target_arch = "wasm32 " ) ) ]
281281 {
282282 let helper = match crate :: global_native:: HelperThread :: new ( ) {
283283 Ok ( helper) => helper,
@@ -298,7 +298,7 @@ impl Default for TimerHandle {
298298 }
299299 }
300300
301- #[ cfg( feature = "wasm-bindgen" ) ]
301+ #[ cfg( all ( feature = "wasm-bindgen" , target_arch = "wasm32" ) ) ]
302302 {
303303 let handle = crate :: global_wasm:: run ( ) ;
304304
@@ -307,6 +307,8 @@ impl Default for TimerHandle {
307307 return handle;
308308 }
309309 }
310+ #[ cfg( all( not( feature = "wasm-bindgen" ) , target_arch = "wasm32" ) ) ]
311+ compile_error ! ( "The `wasm-bindgen` feature must be used when compiling to wasm." ) ;
310312
311313 fallback = HANDLE_FALLBACK . load ( SeqCst ) ;
312314 }
You can’t perform that action at this time.
0 commit comments