diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs index 524d8f857e2..75987d18fe0 100644 --- a/library/core/src/iter/traits/iterator.rs +++ b/library/core/src/iter/traits/iterator.rs @@ -2442,14 +2442,14 @@ pub trait Iterator { R: Try, // FIXME: This bound is rather strange, but means minimal breakage on nightly. // See #85115 for the issue tracking a holistic solution for this and try_map. - R: crate::ops::TryV2>, + R: Try>, { #[inline] fn check(mut f: F) -> impl FnMut((), T) -> ControlFlow> where F: FnMut(&T) -> R, R: Try, - R: crate::ops::TryV2>, + R: Try>, { move |(), x| match f(&x).branch() { ControlFlow::Continue(false) => ControlFlow::CONTINUE, diff --git a/library/core/src/ops/control_flow.rs b/library/core/src/ops/control_flow.rs index c2270c864df..cd2d57699c9 100644 --- a/library/core/src/ops/control_flow.rs +++ b/library/core/src/ops/control_flow.rs @@ -63,7 +63,7 @@ pub enum ControlFlow { } #[unstable(feature = "try_trait_v2", issue = "84277")] -impl ops::TryV2 for ControlFlow { +impl ops::Try for ControlFlow { type Output = C; type Residual = ControlFlow; @@ -165,7 +165,7 @@ impl ControlFlow { /// These are used only as part of implementing the iterator adapters. /// They have mediocre names and non-obvious semantics, so aren't /// currently on a path to potential stabilization. -impl ControlFlow { +impl ControlFlow { /// Create a `ControlFlow` from any type implementing `Try`. #[inline] pub(crate) fn from_try(r: R) -> Self { diff --git a/library/core/src/ops/mod.rs b/library/core/src/ops/mod.rs index 85e04740d96..bd7feb8b183 100644 --- a/library/core/src/ops/mod.rs +++ b/library/core/src/ops/mod.rs @@ -182,13 +182,7 @@ pub use self::range::{Range, RangeFrom, RangeFull, RangeTo}; pub use self::range::{Bound, RangeBounds, RangeInclusive, RangeToInclusive}; #[unstable(feature = "try_trait_v2", issue = "84277")] -pub use self::try_trait::FromResidual; - -#[unstable(feature = "try_trait_v2", issue = "84277")] -pub use self::try_trait::Try; - -#[unstable(feature = "try_trait_transition", reason = "for bootstrap", issue = "none")] -pub(crate) use self::try_trait::Try as TryV2; +pub use self::try_trait::{FromResidual, Try}; #[unstable(feature = "generator_trait", issue = "43122")] pub use self::generator::{Generator, GeneratorState}; diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 78f5954532f..47865240f6a 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -2013,7 +2013,7 @@ impl> FromIterator> for Option { } #[unstable(feature = "try_trait_v2", issue = "84277")] -impl ops::TryV2 for Option { +impl ops::Try for Option { type Output = T; type Residual = Option; diff --git a/library/core/src/result.rs b/library/core/src/result.rs index 861790e8a40..092e6544342 100644 --- a/library/core/src/result.rs +++ b/library/core/src/result.rs @@ -1889,7 +1889,7 @@ impl> FromIterator> for Result { } #[unstable(feature = "try_trait_v2", issue = "84277")] -impl ops::TryV2 for Result { +impl ops::Try for Result { type Output = T; type Residual = Result; diff --git a/library/core/src/task/poll.rs b/library/core/src/task/poll.rs index fc0a4e74797..25070460996 100644 --- a/library/core/src/task/poll.rs +++ b/library/core/src/task/poll.rs @@ -222,7 +222,7 @@ impl From for Poll { } #[unstable(feature = "try_trait_v2", issue = "84277")] -impl ops::TryV2 for Poll> { +impl ops::Try for Poll> { type Output = Poll; type Residual = Result; @@ -252,7 +252,7 @@ impl> ops::FromResidual> for Pol } #[unstable(feature = "try_trait_v2", issue = "84277")] -impl ops::TryV2 for Poll>> { +impl ops::Try for Poll>> { type Output = Poll>; type Residual = Result;