diff --git a/crates/test-macro/src/lib.rs b/crates/test-macro/src/lib.rs index c9e27eb6f63..6ff84219eda 100644 --- a/crates/test-macro/src/lib.rs +++ b/crates/test-macro/src/lib.rs @@ -136,6 +136,10 @@ pub fn wasm_bindgen_test( quote! { #[cfg_attr(not(all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))), #ignore)] } ) } + } else { + tokens.extend(quote! { + #[cfg_attr(not(all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))), allow(dead_code))] + }); } tokens.extend(leading_tokens);