mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-04 19:12:50 +00:00
Constly impl TryV2 and FromResidual for Result
This commit is contained in:
parent
b85107ec71
commit
88258c02a9
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user