From 7b19f321e41a7a3812709bbc8bfbd291ca92a300 Mon Sep 17 00:00:00 2001 From: Harry Barber <106155934+hlbarber@users.noreply.github.com> Date: Thu, 17 Aug 2023 17:36:34 +0100 Subject: [PATCH] tracing: fix `wasm_bindgen_test` macros (#2675) ## Motivation Tests involving `wasm_bindgen_test` currently fail: https://github.com/tokio-rs/tracing/actions/runs/5756318807/job/15605512576 ## Solution - [x] Use `extern crate wasm_bindgen_test` to side-step `no_implicit_prelude`. - [x] https://github.com/rustwasm/wasm-bindgen/pull/3549 - [ ] Consume the release `wasm_bindgen_test` containing said change. --- tracing/tests/macros.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tracing/tests/macros.rs b/tracing/tests/macros.rs index 423984da27..6d9a333b68 100644 --- a/tracing/tests/macros.rs +++ b/tracing/tests/macros.rs @@ -2,6 +2,12 @@ // We call all macros in this module with `no_implicit_prelude` to ensure they do not depend on the standard prelude. #![no_implicit_prelude] extern crate tracing; +#[cfg(target_arch = "wasm32")] +extern crate wasm_bindgen_test; + +// TODO: remove this once https://github.com/tokio-rs/tracing/pull/2675#issuecomment-1667628907 is resolved +#[cfg(target_arch = "wasm32")] +use ::core::option::Option::None; use tracing::{ callsite, debug, debug_span, enabled, error, error_span, event, event_enabled, info, info_span,