Add rustc_on_unimplemented message to std::ops::Try
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
/// 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")]
|
||||
#[rustc_on_unimplemented = "the `?` operator can only be used in a function that returns `Result` \
|
||||
(or another type that implements `std::ops::Try`)"]
|
||||
pub trait Try {
|
||||
/// The type of this value when viewed as successful.
|
||||
#[unstable(feature = "try_trait", issue = "42327")]
|
||||
|
||||
Reference in New Issue
Block a user