Feature request: Make Mutex::new/RwLock::new const. #73714
Labels
A-const-fn
Area: const fn foo(..) {..}. Pure functions which can be applied at compile time.
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
This is useful for the same reason
Mutex::new
being const is (#66806).Right now
RwLock::new
allocates, which is unfortunate.The
parking_lot
crate does this: https://amanieu.github.io/parking_lot/parking_lot/struct.RwLock.html#methodsThe text was updated successfully, but these errors were encountered: