5
5
/// extracting those success or failure values from an existing instance and
6
6
/// creating a new instance from a success or failure value.
7
7
#[ 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(
22
9
on( all(
23
10
any( from_method="from_error" , from_method="from_ok" ) ,
24
11
from_desugaring="QuestionMark" ) ,
@@ -30,7 +17,7 @@ on(all(from_method="into_result", from_desugaring="QuestionMark"),
30
17
message="the `?` operator can only be applied to values \
31
18
that implement `{Try}`",
32
19
label="the `?` operator cannot be applied to type `{Self}`" )
33
- ) ) ]
20
+ ) ]
34
21
#[ doc( alias = "?" ) ]
35
22
pub trait Try {
36
23
/// The type of this value when viewed as successful.
0 commit comments