-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Recently const control flow was stabilized, which enables a lot of methods within the standard library to be made stable const; specifically all of the enum is_variant methods:
Option:is_someandis_noneResult:is_okandis_errPoll:is_readyandis_pendingCow:is_borrowedandis_owned(methods themselves are unstable)IpAddr:is_ipv4andis_ipv6std::path::Prefix:is_verbatim
This issue aims to collect discussion about the stabilization of these methods, due to their similarities and trivial implementations.
Stabilization
-
Option: stabilized in PR#76135 (note: also containsas_ref) -
Result: stabilized in PR#76136 (note: also containsas_ref) -
Pollstabilized in PR#76227 -
Cow: methods made const in PR#76139, the methods themselves are still unstable undercow_is_borrowed -
IpAddr: stabilized in PR#76226 -
Prefix: stabilization proposed in PR#76232, but there is not enough motivation to stabilize this method on its own
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-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.