Constly impl TryV2 and Residual for Option

This commit is contained in:
Albin Hedman 2021-07-04 19:10:21 +02:00
parent 991b375d87
commit a042705a7d
No known key found for this signature in database
GPG key ID: 1F501ECD1BBD70A7

View file

@ -2010,7 +2010,8 @@ impl<A, V: FromIterator<A>> FromIterator<Option<A>> for Option<V> {
}
#[unstable(feature = "try_trait_v2", issue = "84277")]
impl<T> ops::Try for Option<T> {
#[rustc_const_unstable(feature = "const_convert", issue = "none")]
impl<T> const ops::Try for Option<T> {
type Output = T;
type Residual = Option<convert::Infallible>;
@ -2029,7 +2030,8 @@ impl<T> ops::Try for Option<T> {
}
#[unstable(feature = "try_trait_v2", issue = "84277")]
impl<T> ops::FromResidual for Option<T> {
#[rustc_const_unstable(feature = "const_convert", issue = "none")]
impl<T> const ops::FromResidual for Option<T> {
#[inline]
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {