55/// extracting those success or failure values from an existing instance and
66/// creating a new instance from a success or failure value.
77#[ unstable( feature = "try_trait" , issue = "42327" ) ]
8- #[ cfg_attr( bootstrap, rustc_on_unimplemented(
9- on( all(
10- any( from_method="from_error" , from_method="from_ok" ) ,
11- from_desugaring="QuestionMark" ) ,
12- message="the `?` operator can only be used in a \
13- function that returns `Result` or `Option` \
14- (or another type that implements `{Try}`)",
15- label="cannot use the `?` operator in a function that returns `{Self}`" ) ,
16- on( all( from_method="into_result" , from_desugaring="QuestionMark" ) ,
17- message="the `?` operator can only be applied to values \
18- that implement `{Try}`",
19- label="the `?` operator cannot be applied to type `{Self}`" )
20- ) ) ]
21- #[ cfg_attr( not( bootstrap) , rustc_on_unimplemented(
8+ #[ rustc_on_unimplemented(
229on( all(
2310any( from_method="from_error" , from_method="from_ok" ) ,
2411from_desugaring="QuestionMark" ) ,
@@ -30,7 +17,7 @@ on(all(from_method="into_result", from_desugaring="QuestionMark"),
3017message="the `?` operator can only be applied to values \
3118 that implement `{Try}`",
3219label="the `?` operator cannot be applied to type `{Self}`" )
33- ) ) ]
20+ ) ]
3421#[ doc( alias = "?" ) ]
3522pub trait Try {
3623 /// The type of this value when viewed as successful.
0 commit comments