Closed
Description
opened on Sep 1, 2020
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_some
andis_none
Result
:is_ok
andis_err
Poll
:is_ready
andis_pending
Cow
:is_borrowed
andis_owned
(methods themselves are unstable)IpAddr
:is_ipv4
andis_ipv6
std::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
) -
Poll
stabilized 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
Activity