diff options
Diffstat (limited to 'src/libcore/ops/try.rs')
| -rw-r--r-- | src/libcore/ops/try.rs | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/libcore/ops/try.rs b/src/libcore/ops/try.rs index e8f35f8cf24..4f4652084a8 100644 --- a/src/libcore/ops/try.rs +++ b/src/libcore/ops/try.rs @@ -5,20 +5,7 @@ /// extracting those success or failure values from an existing instance and /// creating a new instance from a success or failure value. #[unstable(feature = "try_trait", issue = "42327")] -#[cfg_attr(bootstrap, rustc_on_unimplemented( - on(all( - any(from_method="from_error", from_method="from_ok"), - from_desugaring="QuestionMark"), - message="the `?` operator can only be used in a \ - function that returns `Result` or `Option` \ - (or another type that implements `{Try}`)", - label="cannot use the `?` operator in a function that returns `{Self}`"), - on(all(from_method="into_result", from_desugaring="QuestionMark"), - message="the `?` operator can only be applied to values \ - that implement `{Try}`", - label="the `?` operator cannot be applied to type `{Self}`") -))] -#[cfg_attr(not(bootstrap), rustc_on_unimplemented( +#[rustc_on_unimplemented( on(all( any(from_method="from_error", from_method="from_ok"), from_desugaring="QuestionMark"), @@ -30,7 +17,7 @@ on(all(from_method="into_result", from_desugaring="QuestionMark"), message="the `?` operator can only be applied to values \ that implement `{Try}`", label="the `?` operator cannot be applied to type `{Self}`") -))] +)] #[doc(alias = "?")] pub trait Try { /// The type of this value when viewed as successful. |
