diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2017-06-30 17:11:12 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2017-07-05 22:28:35 -0700 |
| commit | d71caadee22f5a6cd1b16a8c6978efd4135707d0 (patch) | |
| tree | e405f7f77c23d183d3c1e1077cd6bbaab1721010 /src/libcore | |
| parent | 8cab2c73d47a4b0ec7dc1bf40eb59492139fb707 (diff) | |
Add `rustc_on_unimplemented` message to `std::ops::Try`
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/ops/try.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcore/ops/try.rs b/src/libcore/ops/try.rs index 2f0639d1a60..9da9879d38a 100644 --- a/src/libcore/ops/try.rs +++ b/src/libcore/ops/try.rs @@ -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")] |
