Skip to content

Commit b09c254

Browse files
Rollup merge of #88223 - scottmcm:fix-alias, r=yaahc
Remove the `TryV2` alias Post-bootstrap-update cleanup. (No more `try_trait_transition` feature.)
2 parents f2cbbb9 + 65bfc31 commit b09c254

File tree

6 files changed

+9
-15
lines changed

6 files changed

+9
-15
lines changed

library/core/src/iter/traits/iterator.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2442,14 +2442,14 @@ pub trait Iterator {
24422442
R: Try<Output = bool>,
24432443
// FIXME: This bound is rather strange, but means minimal breakage on nightly.
24442444
// See #85115 for the issue tracking a holistic solution for this and try_map.
2445-
R: crate::ops::TryV2<Residual = Result<crate::convert::Infallible, E>>,
2445+
R: Try<Residual = Result<crate::convert::Infallible, E>>,
24462446
{
24472447
#[inline]
24482448
fn check<F, T, R, E>(mut f: F) -> impl FnMut((), T) -> ControlFlow<Result<T, E>>
24492449
where
24502450
F: FnMut(&T) -> R,
24512451
R: Try<Output = bool>,
2452-
R: crate::ops::TryV2<Residual = Result<crate::convert::Infallible, E>>,
2452+
R: Try<Residual = Result<crate::convert::Infallible, E>>,
24532453
{
24542454
move |(), x| match f(&x).branch() {
24552455
ControlFlow::Continue(false) => ControlFlow::CONTINUE,

library/core/src/ops/control_flow.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub enum ControlFlow<B, C = ()> {
6363
}
6464

6565
#[unstable(feature = "try_trait_v2", issue = "84277")]
66-
impl<B, C> ops::TryV2 for ControlFlow<B, C> {
66+
impl<B, C> ops::Try for ControlFlow<B, C> {
6767
type Output = C;
6868
type Residual = ControlFlow<B, convert::Infallible>;
6969

@@ -165,7 +165,7 @@ impl<B, C> ControlFlow<B, C> {
165165
/// These are used only as part of implementing the iterator adapters.
166166
/// They have mediocre names and non-obvious semantics, so aren't
167167
/// currently on a path to potential stabilization.
168-
impl<R: ops::TryV2> ControlFlow<R, R::Output> {
168+
impl<R: ops::Try> ControlFlow<R, R::Output> {
169169
/// Create a `ControlFlow` from any type implementing `Try`.
170170
#[inline]
171171
pub(crate) fn from_try(r: R) -> Self {

library/core/src/ops/mod.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,7 @@ pub use self::range::{Range, RangeFrom, RangeFull, RangeTo};
182182
pub use self::range::{Bound, RangeBounds, RangeInclusive, RangeToInclusive};
183183

184184
#[unstable(feature = "try_trait_v2", issue = "84277")]
185-
pub use self::try_trait::FromResidual;
186-
187-
#[unstable(feature = "try_trait_v2", issue = "84277")]
188-
pub use self::try_trait::Try;
189-
190-
#[unstable(feature = "try_trait_transition", reason = "for bootstrap", issue = "none")]
191-
pub(crate) use self::try_trait::Try as TryV2;
185+
pub use self::try_trait::{FromResidual, Try};
192186

193187
#[unstable(feature = "generator_trait", issue = "43122")]
194188
pub use self::generator::{Generator, GeneratorState};

library/core/src/option.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2013,7 +2013,7 @@ impl<A, V: FromIterator<A>> FromIterator<Option<A>> for Option<V> {
20132013
}
20142014

20152015
#[unstable(feature = "try_trait_v2", issue = "84277")]
2016-
impl<T> ops::TryV2 for Option<T> {
2016+
impl<T> ops::Try for Option<T> {
20172017
type Output = T;
20182018
type Residual = Option<convert::Infallible>;
20192019

library/core/src/result.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,7 @@ impl<A, E, V: FromIterator<A>> FromIterator<Result<A, E>> for Result<V, E> {
18891889
}
18901890

18911891
#[unstable(feature = "try_trait_v2", issue = "84277")]
1892-
impl<T, E> ops::TryV2 for Result<T, E> {
1892+
impl<T, E> ops::Try for Result<T, E> {
18931893
type Output = T;
18941894
type Residual = Result<convert::Infallible, E>;
18951895

library/core/src/task/poll.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ impl<T> From<T> for Poll<T> {
222222
}
223223

224224
#[unstable(feature = "try_trait_v2", issue = "84277")]
225-
impl<T, E> ops::TryV2 for Poll<Result<T, E>> {
225+
impl<T, E> ops::Try for Poll<Result<T, E>> {
226226
type Output = Poll<T>;
227227
type Residual = Result<convert::Infallible, E>;
228228

@@ -252,7 +252,7 @@ impl<T, E, F: From<E>> ops::FromResidual<Result<convert::Infallible, E>> for Pol
252252
}
253253

254254
#[unstable(feature = "try_trait_v2", issue = "84277")]
255-
impl<T, E> ops::TryV2 for Poll<Option<Result<T, E>>> {
255+
impl<T, E> ops::Try for Poll<Option<Result<T, E>>> {
256256
type Output = Poll<Option<T>>;
257257
type Residual = Result<convert::Infallible, E>;
258258

0 commit comments

Comments
 (0)