Skip to content

Commit a042705

Browse files
committed
Constly impl TryV2 and Residual for Option
1 parent 991b375 commit a042705

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

library/core/src/option.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2010,7 +2010,8 @@ impl<A, V: FromIterator<A>> FromIterator<Option<A>> for Option<V> {
20102010
}
20112011

20122012
#[unstable(feature = "try_trait_v2", issue = "84277")]
2013-
impl<T> ops::Try for Option<T> {
2013+
#[rustc_const_unstable(feature = "const_convert", issue = "none")]
2014+
impl<T> const ops::Try for Option<T> {
20142015
type Output = T;
20152016
type Residual = Option<convert::Infallible>;
20162017

@@ -2029,7 +2030,8 @@ impl<T> ops::Try for Option<T> {
20292030
}
20302031

20312032
#[unstable(feature = "try_trait_v2", issue = "84277")]
2032-
impl<T> ops::FromResidual for Option<T> {
2033+
#[rustc_const_unstable(feature = "const_convert", issue = "none")]
2034+
impl<T> const ops::FromResidual for Option<T> {
20332035
#[inline]
20342036
fn from_residual(residual: Option<convert::Infallible>) -> Self {
20352037
match residual {

0 commit comments

Comments
 (0)