diff options
| author | Albin Hedman <albin9604@gmail.com> | 2021-07-04 00:58:32 +0200 |
|---|---|---|
| committer | Albin Hedman <albin9604@gmail.com> | 2021-09-15 16:57:59 +0200 |
| commit | 88258c02a9c70fb562e4c646386411f4e0a4a80a (patch) | |
| tree | b9abd08bd9f38b3c3c98858e78472c1835e0567b | |
| parent | b85107ec711aa4e7de8ffe3deab6f88800e2a680 (diff) | |
| download | rust-88258c02a9c70fb562e4c646386411f4e0a4a80a.tar.gz rust-88258c02a9c70fb562e4c646386411f4e0a4a80a.zip | |
Constly impl TryV2 and FromResidual for Result
| -rw-r--r-- | library/core/src/result.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/library/core/src/result.rs b/library/core/src/result.rs index 092e6544342..d3587a1b2b8 100644 --- a/library/core/src/result.rs +++ b/library/core/src/result.rs @@ -1889,7 +1889,8 @@ impl<A, E, V: FromIterator<A>> FromIterator<Result<A, E>> for Result<V, E> { } #[unstable(feature = "try_trait_v2", issue = "84277")] -impl<T, E> ops::Try for Result<T, E> { +#[rustc_const_unstable(feature = "const_convert", issue = "none")] +impl<T, E> const ops::Try for Result<T, E> { type Output = T; type Residual = Result<convert::Infallible, E>; @@ -1908,7 +1909,8 @@ impl<T, E> ops::Try for Result<T, E> { } #[unstable(feature = "try_trait_v2", issue = "84277")] -impl<T, E, F: From<E>> ops::FromResidual<Result<convert::Infallible, E>> for Result<T, F> { +#[rustc_const_unstable(feature = "const_convert", issue = "none")] +impl<T, E, F: From<E>> const ops::FromResidual<Result<convert::Infallible, E>> for Result<T, F> { #[inline] fn from_residual(residual: Result<convert::Infallible, E>) -> Self { match residual { |
