Rollup merge of #88223 - scottmcm:fix-alias, r=yaahc

Remove the `TryV2` alias

Post-bootstrap-update cleanup.

(No more `try_trait_transition` feature.)
This commit is contained in:
Léo Lanteri Thauvin 2021-08-25 15:48:52 +02:00 committed by GitHub
commit b09c2547df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 15 deletions

View File

@ -2442,14 +2442,14 @@ pub trait Iterator {
R: Try<Output = bool>, R: Try<Output = bool>,
// FIXME: This bound is rather strange, but means minimal breakage on nightly. // 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. // 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] #[inline]
fn check<F, T, R, E>(mut f: F) -> impl FnMut((), T) -> ControlFlow<Result<T, E>> fn check<F, T, R, E>(mut f: F) -> impl FnMut((), T) -> ControlFlow<Result<T, E>>
where where
F: FnMut(&T) -> R, F: FnMut(&T) -> R,
R: Try<Output = bool>, 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() { move |(), x| match f(&x).branch() {
ControlFlow::Continue(false) => ControlFlow::CONTINUE, ControlFlow::Continue(false) => ControlFlow::CONTINUE,

View File

@ -63,7 +63,7 @@ pub enum ControlFlow<B, C = ()> {
} }
#[unstable(feature = "try_trait_v2", issue = "84277")] #[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 Output = C;
type Residual = ControlFlow<B, convert::Infallible>; 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. /// These are used only as part of implementing the iterator adapters.
/// They have mediocre names and non-obvious semantics, so aren't /// They have mediocre names and non-obvious semantics, so aren't
/// currently on a path to potential stabilization. /// 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`. /// Create a `ControlFlow` from any type implementing `Try`.
#[inline] #[inline]
pub(crate) fn from_try(r: R) -> Self { pub(crate) fn from_try(r: R) -> Self {

View File

@ -182,13 +182,7 @@ pub use self::range::{Range, RangeFrom, RangeFull, RangeTo};
pub use self::range::{Bound, RangeBounds, RangeInclusive, RangeToInclusive}; pub use self::range::{Bound, RangeBounds, RangeInclusive, RangeToInclusive};
#[unstable(feature = "try_trait_v2", issue = "84277")] #[unstable(feature = "try_trait_v2", issue = "84277")]
pub use self::try_trait::FromResidual; pub use self::try_trait::{FromResidual, Try};
#[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;
#[unstable(feature = "generator_trait", issue = "43122")] #[unstable(feature = "generator_trait", issue = "43122")]
pub use self::generator::{Generator, GeneratorState}; pub use self::generator::{Generator, GeneratorState};

View File

@ -2013,7 +2013,7 @@ impl<A, V: FromIterator<A>> FromIterator<Option<A>> for Option<V> {
} }
#[unstable(feature = "try_trait_v2", issue = "84277")] #[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 Output = T;
type Residual = Option<convert::Infallible>; type Residual = Option<convert::Infallible>;

View File

@ -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")] #[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 Output = T;
type Residual = Result<convert::Infallible, E>; type Residual = Result<convert::Infallible, E>;

View File

@ -222,7 +222,7 @@ impl<T> From<T> for Poll<T> {
} }
#[unstable(feature = "try_trait_v2", issue = "84277")] #[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 Output = Poll<T>;
type Residual = Result<convert::Infallible, E>; 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")] #[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 Output = Poll<Option<T>>;
type Residual = Result<convert::Infallible, E>; type Residual = Result<convert::Infallible, E>;