diff --git a/futures-util/src/lock/mutex.rs b/futures-util/src/lock/mutex.rs index 79272f4bed..39ddbed5fb 100644 --- a/futures-util/src/lock/mutex.rs +++ b/futures-util/src/lock/mutex.rs @@ -73,7 +73,7 @@ const HAS_WAITERS: usize = 1 << 1; impl Mutex { /// Creates a new futures-aware mutex. - pub fn new(t: T) -> Self { + pub const fn new(t: T) -> Self { Self { state: AtomicUsize::new(0), waiters: StdMutex::new(Slab::new()),