From 65bfc3130a782464d301c85b3edcbed5732b8a52 Mon Sep 17 00:00:00 2001
From: Scott McMurray <scottmcm@users.noreply.github.com>
Date: Sat, 21 Aug 2021 15:09:03 -0700
Subject: [PATCH] Remove the `TryV2` alias

Post-bootstrap-update cleanup.
---
 library/core/src/iter/traits/iterator.rs | 4 ++--
 library/core/src/ops/control_flow.rs     | 4 ++--
 library/core/src/ops/mod.rs              | 8 +-------
 library/core/src/option.rs               | 2 +-
 library/core/src/result.rs               | 2 +-
 library/core/src/task/poll.rs            | 4 ++--
 6 files changed, 9 insertions(+), 15 deletions(-)

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<Output = bool>,
         // 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<Residual = Result<crate::convert::Infallible, E>>,
+        R: Try<Residual = Result<crate::convert::Infallible, E>>,
     {
         #[inline]
         fn check<F, T, R, E>(mut f: F) -> impl FnMut((), T) -> ControlFlow<Result<T, E>>
         where
             F: FnMut(&T) -> R,
             R: Try<Output = bool>,
-            R: crate::ops::TryV2<Residual = Result<crate::convert::Infallible, E>>,
+            R: Try<Residual = Result<crate::convert::Infallible, E>>,
         {
             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<B, C = ()> {
 }
 
 #[unstable(feature = "try_trait_v2", issue = "84277")]
-impl<B, C> ops::TryV2 for ControlFlow<B, C> {
+impl<B, C> ops::Try for ControlFlow<B, C> {
     type Output = C;
     type Residual = ControlFlow<B, convert::Infallible>;
 
@@ -165,7 +165,7 @@ impl<B, C> ControlFlow<B, C> {
 /// 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<R: ops::TryV2> ControlFlow<R, R::Output> {
+impl<R: ops::Try> ControlFlow<R, R::Output> {
     /// 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<A, V: FromIterator<A>> FromIterator<Option<A>> for Option<V> {
 }
 
 #[unstable(feature = "try_trait_v2", issue = "84277")]
-impl<T> ops::TryV2 for Option<T> {
+impl<T> ops::Try for Option<T> {
     type Output = T;
     type Residual = Option<convert::Infallible>;
 
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<A, E, V: FromIterator<A>> FromIterator<Result<A, E>> for Result<V, E> {
 }
 
 #[unstable(feature = "try_trait_v2", issue = "84277")]
-impl<T, E> ops::TryV2 for Result<T, E> {
+impl<T, E> ops::Try for Result<T, E> {
     type Output = T;
     type Residual = Result<convert::Infallible, E>;
 
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<T> From<T> for Poll<T> {
 }
 
 #[unstable(feature = "try_trait_v2", issue = "84277")]
-impl<T, E> ops::TryV2 for Poll<Result<T, E>> {
+impl<T, E> ops::Try for Poll<Result<T, E>> {
     type Output = Poll<T>;
     type Residual = Result<convert::Infallible, E>;
 
@@ -252,7 +252,7 @@ impl<T, E, F: From<E>> ops::FromResidual<Result<convert::Infallible, E>> for Pol
 }
 
 #[unstable(feature = "try_trait_v2", issue = "84277")]
-impl<T, E> ops::TryV2 for Poll<Option<Result<T, E>>> {
+impl<T, E> ops::Try for Poll<Option<Result<T, E>>> {
     type Output = Poll<Option<T>>;
     type Residual = Result<convert::Infallible, E>;