-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
in which the must-use additional messaging is tucked into a note #50437
Conversation
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
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.
Great improvement! I wonder if it would be reasonable to unify src/test/compile-fail/unused-result.rs
and src/test/ui/fn_must_use.stderr
...
@@ -14,35 +14,27 @@ | |||
#[must_use] | |||
enum MustUse { Test } | |||
|
|||
#[must_use = "some message"] | |||
enum MustUseMsg { Test2 } |
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.
Why is this being removed?
|
||
#[allow(unused_results)] | ||
fn test() { | ||
foo::<isize>(); | ||
foo::<MustUse>(); //~ ERROR: unused `MustUse` which must be used | ||
foo::<MustUseMsg>(); //~ ERROR: unused `MustUseMsg` which must be used: some message |
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.
Instead of removing, this can be
foo::<MustUseMsg>(); //~ ERROR: unused `MustUseMsg` which must be used
//~^ NOTE: some message
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Also, a comment is edited to reflect that spaces around the equals-sign in attributes is the standard (q.v. rust-lang/style-team@bea80532e7).
@bors r+ rollup |
📌 Commit 5a5a25c has been approved by |
in which the must-use additional messaging is tucked into a note _I_ think it looks better this way! What do _you_ think?? ![must_use_note](https://user-images.githubusercontent.com/1076988/39612597-b6dd2dae-4f15-11e8-87ec-ab9da21ef062.png) r? @estebank
☀️ Test successful - status-appveyor, status-travis |
I think it looks better this way! What do you think??
r? @estebank