about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2025-02-12 14:44:30 -0800
committerEric Huss <eric@huss.org>2025-02-12 14:44:30 -0800
commitc91737373a5d24ca930ab0fe478e25c575dcd18e (patch)
tree23f0a5797a690140e43c979c14e214bd78b9dd63
parentced8e650cddbafad92094b2c89dee97b8a807d9c (diff)
downloadrust-c91737373a5d24ca930ab0fe478e25c575dcd18e.tar.gz
rust-c91737373a5d24ca930ab0fe478e25c575dcd18e.zip
Fix import in bench for wasm
-rw-r--r--library/std/benches/time.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/library/std/benches/time.rs b/library/std/benches/time.rs
index 552481cad92..dfd886738f9 100644
--- a/library/std/benches/time.rs
+++ b/library/std/benches/time.rs
@@ -1,5 +1,3 @@
-use std::time::Instant;
-
 #[cfg(not(target_arch = "wasm32"))]
 use test::{Bencher, black_box};
 
@@ -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));