-
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
stabilize #[must_use]
for functions and must-use comparison operators (RFC 1940)
#48925
Conversation
☔ The latest upstream changes (presumably #47813) made this pull request unmergeable. Please resolve the merge conflicts. |
No longer blocked. Needs rebase though, ping @zackmdavis =) |
Wednesday |
f920bc2
to
442c708
Compare
(also left a comment on the tracking issue re whether to error on incorrect attribute placement) |
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 |
442c708
to
d8cbed9
Compare
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 |
☔ The latest upstream changes (presumably #50290) made this pull request unmergeable. Please resolve the merge conflicts. |
d8cbed9
to
9d5e08f
Compare
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 |
9d5e08f
to
c26ff28
Compare
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 |
c26ff28
to
4b9b957
Compare
The must-use lint needs the DefId of called functions and method receivers in order to look for a `#[must_use]` attribute, but this would ICE (!) if a called function was actually a closure (with a non-unit return value). Instead, let's be specific that we want a `Def::Fn`, rather than blithely assuming that we can get the DefId of a qpath. Supporting must-use closures doesn't seem like a priority, but could conceivably be added in the future if desired (conditional on the statement and expression attributes (rust-lang#15701) story being amicable).
This is in the matter of RFC 1940 and tracking issue rust-lang#43302.
4b9b957
to
3dbdccc
Compare
@nikomatsakis ready |
cc @rust-lang/docs -- this PR contains changed that will need to be documented in stable docs. |
@bors r+ |
📌 Commit 3dbdccc has been approved by |
@nikomatsakis: Why not adding it in this PR directly? |
stabilize `#[must_use]` for functions and must-use comparison operators (RFC 1940) r? @nikomatsakis
☀️ Test successful - status-appveyor, status-travis |
r? @nikomatsakis