-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add rustc_on_unimplemented
message to std::ops::Try
#43001
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
The description doesn't make sense grammatically. |
src/libcore/ops/try.rs
Outdated
@@ -15,6 +15,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")] | |||
#[rustc_on_unimplemented = "the `?` operator can only be used in function that returns types that implement `std::ops::Try`, like `Result`"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"in function that returns" should be "in a function that returns" or "in functions that return"
Also since this is aimed at beginners, perhaps put the more common answer in front? "in functions that return Result
(or another type implementing std::ops::Try
)"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed!
Doesn't this affect any ui tests? We should probably have one then. |
|
This LGTM modulo the changes @durka suggested. |
9b9667e
to
2f9267b
Compare
@bors r=aturon rollup |
📌 Commit 2f9267b has been approved by |
🔒 Merge conflict |
2f9267b
to
d71caad
Compare
@bors r=aturon rollup |
📌 Commit d71caad has been approved by |
☀️ Test successful - status-appveyor, status-travis |
#42694, #35946.