-
-
Notifications
You must be signed in to change notification settings - Fork 16.8k
Feature request: Make Mutex::new/RwLock::new const. #73714
Copy link
Copy link
Closed
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-libs-api[DEPRECATED; DO NOT USE][DEPRECATED; DO NOT USE]
Description
Activity
Metadata
Metadata
Assignees
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-libs-api[DEPRECATED; DO NOT USE][DEPRECATED; DO NOT USE]
This is useful for the same reason
Mutex::newbeing const is (#66806).Right now
RwLock::newallocates, which is unfortunate.The
parking_lotcrate does this: https://amanieu.github.io/parking_lot/parking_lot/struct.RwLock.html#methods