@@ -112,7 +112,7 @@ use crate::ops::ControlFlow;
112
112
/// R::from_output(accum)
113
113
/// }
114
114
/// ```
115
- #[ unstable( feature = "try_trait_v2" , issue = "84277" ) ]
115
+ #[ unstable( feature = "try_trait_v2" , issue = "84277" , old_name = "try_trait" ) ]
116
116
#[ rustc_on_unimplemented(
117
117
on(
118
118
all( from_desugaring = "TryBlock" ) ,
@@ -130,7 +130,7 @@ use crate::ops::ControlFlow;
130
130
#[ lang = "Try" ]
131
131
pub trait Try : FromResidual {
132
132
/// The type of the value produced by `?` when *not* short-circuiting.
133
- #[ unstable( feature = "try_trait_v2" , issue = "84277" ) ]
133
+ #[ unstable( feature = "try_trait_v2" , issue = "84277" , old_name = "try_trait" ) ]
134
134
type Output ;
135
135
136
136
/// The type of the value passed to [`FromResidual::from_residual`]
@@ -154,7 +154,7 @@ pub trait Try: FromResidual {
154
154
/// then typically you can use `Foo<std::convert::Infallible>` as its `Residual`
155
155
/// type: that type will have a "hole" in the correct place, and will maintain the
156
156
/// "foo-ness" of the residual so other types need to opt-in to interconversion.
157
- #[ unstable( feature = "try_trait_v2" , issue = "84277" ) ]
157
+ #[ unstable( feature = "try_trait_v2" , issue = "84277" , old_name = "try_trait" ) ]
158
158
type Residual ;
159
159
160
160
/// Constructs the type from its `Output` type.
@@ -186,7 +186,7 @@ pub trait Try: FromResidual {
186
186
/// assert_eq!(r, Some(4));
187
187
/// ```
188
188
#[ lang = "from_output" ]
189
- #[ unstable( feature = "try_trait_v2" , issue = "84277" ) ]
189
+ #[ unstable( feature = "try_trait_v2" , issue = "84277" , old_name = "try_trait" ) ]
190
190
fn from_output ( output : Self :: Output ) -> Self ;
191
191
192
192
/// Used in `?` to decide whether the operator should produce a value
@@ -213,7 +213,7 @@ pub trait Try: FromResidual {
213
213
/// );
214
214
/// ```
215
215
#[ lang = "branch" ]
216
- #[ unstable( feature = "try_trait_v2" , issue = "84277" ) ]
216
+ #[ unstable( feature = "try_trait_v2" , issue = "84277" , old_name = "try_trait" ) ]
217
217
fn branch ( self ) -> ControlFlow < Self :: Residual , Self :: Output > ;
218
218
}
219
219
@@ -303,7 +303,7 @@ pub trait Try: FromResidual {
303
303
) ,
304
304
) ]
305
305
#[ rustc_diagnostic_item = "FromResidual" ]
306
- #[ unstable( feature = "try_trait_v2" , issue = "84277" ) ]
306
+ #[ unstable( feature = "try_trait_v2" , issue = "84277" , old_name = "try_trait" ) ]
307
307
pub trait FromResidual < R = <Self as Try >:: Residual > {
308
308
/// Constructs the type from a compatible `Residual` type.
309
309
///
@@ -326,7 +326,7 @@ pub trait FromResidual<R = <Self as Try>::Residual> {
326
326
/// );
327
327
/// ```
328
328
#[ lang = "from_residual" ]
329
- #[ unstable( feature = "try_trait_v2" , issue = "84277" ) ]
329
+ #[ unstable( feature = "try_trait_v2" , issue = "84277" , old_name = "try_trait" ) ]
330
330
fn from_residual ( residual : R ) -> Self ;
331
331
}
332
332
0 commit comments