@@ -41,8 +41,7 @@ use crate::ops::ControlFlow;
4141/// output type that we want:
4242/// ```
4343/// # #![feature(try_trait_v2)]
44- /// # #![feature(try_trait_transition)]
45- /// # use std::ops::TryV2 as Try;
44+ /// # use std::ops::Try;
4645/// fn simple_try_fold_1<A, T, R: Try<Output = A>>(
4746/// iter: impl Iterator<Item = T>,
4847/// mut accum: A,
@@ -56,9 +55,8 @@ use crate::ops::ControlFlow;
5655/// into the return type using [`Try::from_output`]:
5756/// ```
5857/// # #![feature(try_trait_v2)]
59- /// # #![feature(try_trait_transition)]
6058/// # #![feature(control_flow_enum)]
61- /// # use std::ops::{ControlFlow, TryV2 as Try};
59+ /// # use std::ops::{ControlFlow, Try};
6260/// fn simple_try_fold_2<A, T, R: Try<Output = A>>(
6361/// iter: impl Iterator<Item = T>,
6462/// mut accum: A,
@@ -81,9 +79,8 @@ use crate::ops::ControlFlow;
8179/// recreated from their corresponding residual, so we'll just call it:
8280/// ```
8381/// # #![feature(try_trait_v2)]
84- /// # #![feature(try_trait_transition)]
8582/// # #![feature(control_flow_enum)]
86- /// # use std::ops::{ControlFlow, TryV2 as Try};
83+ /// # use std::ops::{ControlFlow, Try};
8784/// pub fn simple_try_fold_3<A, T, R: Try<Output = A>>(
8885/// iter: impl Iterator<Item = T>,
8986/// mut accum: A,
@@ -103,10 +100,9 @@ use crate::ops::ControlFlow;
103100/// But this "call `branch`, then `match` on it, and `return` if it was a
104101/// `Break`" is exactly what happens inside the `?` operator. So rather than
105102/// do all this manually, we can just use `?` instead:
106- /// ```compile_fail (enable again once ? converts to the new trait)
103+ /// ```
107104/// # #![feature(try_trait_v2)]
108- /// # #![feature(try_trait_transition)]
109- /// # use std::ops::TryV2 as Try;
105+ /// # use std::ops::Try;
110106/// fn simple_try_fold<A, T, R: Try<Output = A>>(
111107/// iter: impl Iterator<Item = T>,
112108/// mut accum: A,
@@ -160,8 +156,7 @@ pub trait Try: FromResidual {
160156 /// ```
161157 /// #![feature(try_trait_v2)]
162158 /// #![feature(control_flow_enum)]
163- /// #![feature(try_trait_transition)]
164- /// use std::ops::TryV2 as Try;
159+ /// use std::ops::Try;
165160 ///
166161 /// assert_eq!(<Result<_, String> as Try>::from_output(3), Ok(3));
167162 /// assert_eq!(<Option<_> as Try>::from_output(4), Some(4));
@@ -193,8 +188,7 @@ pub trait Try: FromResidual {
193188 /// ```
194189 /// #![feature(try_trait_v2)]
195190 /// #![feature(control_flow_enum)]
196- /// #![feature(try_trait_transition)]
197- /// use std::ops::{ControlFlow, TryV2 as Try};
191+ /// use std::ops::{ControlFlow, Try};
198192 ///
199193 /// assert_eq!(Ok::<_, String>(3).branch(), ControlFlow::Continue(3));
200194 /// assert_eq!(Err::<String, _>(3).branch(), ControlFlow::Break(Err(3)));
0 commit comments