diff options
| author | bors <bors@rust-lang.org> | 2017-07-06 05:29:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-07-06 05:29:09 +0000 |
| commit | 7f1c4beb68d1834e86d4e1d087fd4b9757bb3675 (patch) | |
| tree | e405f7f77c23d183d3c1e1077cd6bbaab1721010 /src/libcore | |
| parent | 8cab2c73d47a4b0ec7dc1bf40eb59492139fb707 (diff) | |
| parent | d71caadee22f5a6cd1b16a8c6978efd4135707d0 (diff) | |
| download | rust-7f1c4beb68d1834e86d4e1d087fd4b9757bb3675.tar.gz rust-7f1c4beb68d1834e86d4e1d087fd4b9757bb3675.zip | |
Auto merge of #43001 - estebank:try-on-unimplemented, r=aturon
Add `rustc_on_unimplemented` message to `std::ops::Try` #42694, #35946.
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")] |
