Skip to content

Commit

Permalink
tracing: fix wasm_bindgen_test macros (#2675)
Browse files Browse the repository at this point in the history
## 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] rustwasm/wasm-bindgen#3549
- [ ] Consume the release `wasm_bindgen_test` containing said change.
  • Loading branch information
hlbarber authored and davidbarsky committed Sep 25, 2023
1 parent 230e6e8 commit ab27b7a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tracing/tests/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ab27b7a

Please sign in to comment.