Skip to content

Commit 8281f64

Browse files
committed
Constly impl TryV2 and FromResidual for Result
1 parent ac921dd commit 8281f64

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

library/core/src/result.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,7 +1871,8 @@ impl<A, E, V: FromIterator<A>> FromIterator<Result<A, E>> for Result<V, E> {
18711871
}
18721872

18731873
#[unstable(feature = "try_trait_v2", issue = "84277")]
1874-
impl<T, E> ops::TryV2 for Result<T, E> {
1874+
#[rustc_const_unstable(feature = "const_identity_convert", issue = "none")]
1875+
impl<T, E> const ops::TryV2 for Result<T, E> {
18751876
type Output = T;
18761877
type Residual = Result<convert::Infallible, E>;
18771878

@@ -1890,7 +1891,8 @@ impl<T, E> ops::TryV2 for Result<T, E> {
18901891
}
18911892

18921893
#[unstable(feature = "try_trait_v2", issue = "84277")]
1893-
impl<T, E, F: From<E>> ops::FromResidual<Result<convert::Infallible, E>> for Result<T, F> {
1894+
#[rustc_const_unstable(feature = "const_identity_convert", issue = "none")]
1895+
impl<T, E, F: From<E>> const ops::FromResidual<Result<convert::Infallible, E>> for Result<T, F> {
18941896
#[inline]
18951897
fn from_residual(residual: Result<convert::Infallible, E>) -> Self {
18961898
match residual {

0 commit comments

Comments
 (0)