Skip to content

Commit

Permalink
Unrolled build for rust-lang#136949
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#136949 - ehuss:wasm-bench-time, r=jhpratt

Fix import in bench for wasm

This import was causing annoying unused import errors when checking the standard library for some wasm targets. The problem is that everything here is disabled if it is wasm32, but this import wasn't cfg'd.
  • Loading branch information
rust-timer authored Feb 13, 2025
2 parents 3cb0272 + c917373 commit adaea75
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions library/std/benches/time.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::time::Instant;

#[cfg(not(target_arch = "wasm32"))]
use test::{Bencher, black_box};

Expand All @@ -10,6 +8,7 @@ macro_rules! bench_instant_threaded {
fn $bench_name(b: &mut Bencher) -> std::thread::Result<()> {
use std::sync::Arc;
use std::sync::atomic::{AtomicBool, Ordering};
use std::time::Instant;

let running = Arc::new(AtomicBool::new(true));

Expand Down

0 comments on commit adaea75

Please # to comment.