Skip to content

Commit 7c8c209

Browse files
committed
Constly impl TryV2 and Residual for Option
1 parent 7fe6993 commit 7c8c209

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

library/core/src/option.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1972,7 +1972,8 @@ impl<A, V: FromIterator<A>> FromIterator<Option<A>> for Option<V> {
19721972
}
19731973

19741974
#[unstable(feature = "try_trait_v2", issue = "84277")]
1975-
impl<T> ops::TryV2 for Option<T> {
1975+
#[rustc_const_unstable(feature = "const_identity_convert", issue = "none")]
1976+
impl<T> const ops::TryV2 for Option<T> {
19761977
type Output = T;
19771978
type Residual = Option<convert::Infallible>;
19781979

@@ -1991,7 +1992,8 @@ impl<T> ops::TryV2 for Option<T> {
19911992
}
19921993

19931994
#[unstable(feature = "try_trait_v2", issue = "84277")]
1994-
impl<T> ops::FromResidual for Option<T> {
1995+
#[rustc_const_unstable(feature = "const_identity_convert", issue = "none")]
1996+
impl<T> const ops::FromResidual for Option<T> {
19951997
#[inline]
19961998
fn from_residual(residual: Option<convert::Infallible>) -> Self {
19971999
match residual {

0 commit comments

Comments
 (0)