diff --git a/tokio/src/runtime/task/mod.rs b/tokio/src/runtime/task/mod.rs index ac1ee157ea2..b6599888efe 100644 --- a/tokio/src/runtime/task/mod.rs +++ b/tokio/src/runtime/task/mod.rs @@ -501,8 +501,9 @@ impl Id { cfg_not_has_atomic_u64! { pub(crate) fn next() -> Self { use once_cell::sync::Lazy; - use crate::loom::Mutex; - static NEXT_ID: Lazy> = Lazy(|| Mutex::new(1)); + use crate::loom::sync::Mutex; + + static NEXT_ID: Lazy> = Lazy::new(|| Mutex::new(1)); let mut lock = NEXT_ID.lock(); let id = *lock; lock += 1;