Skip to content
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

Merged
merged 1 commit into from
Jul 6, 2017

Conversation

estebank
Copy link
Contributor

@estebank estebank commented Jul 1, 2017

@rust-highfive
Copy link
Collaborator

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@est31
Copy link
Member

est31 commented Jul 1, 2017

The description doesn't make sense grammatically.

@@ -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`"]
Copy link
Contributor

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)"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed!

@oli-obk
Copy link
Contributor

oli-obk commented Jul 1, 2017

Doesn't this affect any ui tests? We should probably have one then.

@Mark-Simulacrum Mark-Simulacrum added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 2, 2017
@Mark-Simulacrum
Copy link
Member

[00:03:12] tidy error: /checkout/src/libcore/ops/try.rs:18: line longer than 100 chars

@aturon
Copy link
Member

aturon commented Jul 3, 2017

This LGTM modulo the changes @durka suggested.

@aturon aturon added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 3, 2017
@estebank estebank force-pushed the try-on-unimplemented branch 2 times, most recently from 9b9667e to 2f9267b Compare July 5, 2017 23:43
@estebank
Copy link
Contributor Author

estebank commented Jul 6, 2017

@bors r=aturon rollup

@bors
Copy link
Contributor

bors commented Jul 6, 2017

📌 Commit 2f9267b has been approved by aturon

@bors
Copy link
Contributor

bors commented Jul 6, 2017

🔒 Merge conflict

@estebank estebank force-pushed the try-on-unimplemented branch from 2f9267b to d71caad Compare July 6, 2017 05:28
@estebank
Copy link
Contributor Author

estebank commented Jul 6, 2017

@bors r=aturon rollup

@bors
Copy link
Contributor

bors commented Jul 6, 2017

📌 Commit d71caad has been approved by aturon

@bors
Copy link
Contributor

bors commented Jul 6, 2017

⌛ Testing commit d71caad with merge 7f1c4be...

bors added a commit that referenced this pull request Jul 6, 2017
Add `rustc_on_unimplemented` message to `std::ops::Try`

#42694, #35946.
@bors
Copy link
Contributor

bors commented Jul 6, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: aturon
Pushing 7f1c4be to master...

@bors bors merged commit d71caad into rust-lang:master Jul 6, 2017
bors added a commit that referenced this pull request Jul 28, 2017
Use `rustc_on_unimplemented`'s trait name argument in `try`

Follow up to #43000 and #43001. Fix #42694.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants