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

Lint against more useless #[must_use] attributes #93926

Merged
merged 1 commit into from
Mar 1, 2022

Conversation

PatchMixolydic
Copy link
Contributor

This expands the existing #[must_use] check in unused_attributes to lint against pretty much everything #[must_use] doesn't support.
Fixes #93906.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Feb 12, 2022
@rust-highfive
Copy link
Collaborator

r? @matthewjasper

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 12, 2022
@rust-log-analyzer

This comment has been minimized.

@PatchMixolydic PatchMixolydic force-pushed the bugfix/must_use-on-exprs branch 2 times, most recently from 155601f to 06e6d37 Compare February 12, 2022 15:39
@cjgillot
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Feb 26, 2022

📌 Commit 06e6d37f23f6e9934310380eee06eca977a6e770 has been approved by cjgillot

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 26, 2022
@bors
Copy link
Contributor

bors commented Feb 27, 2022

⌛ Testing commit 06e6d37f23f6e9934310380eee06eca977a6e770 with merge 054616ddf350f630418dc6221a3a0db6ff74531d...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Feb 27, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 27, 2022
@cjgillot cjgillot 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 Feb 27, 2022
@cjgillot cjgillot self-assigned this Feb 27, 2022
This expands the existing `#[must_use]` check in `unused_attributes`
to lint against pretty much everything `#[must_use]` doesn't support.
Fixes rust-lang#93906.
@PatchMixolydic
Copy link
Contributor Author

I'm hoping the missing unused_must_use lints in the previous log are just due to the feature gate error.
@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 27, 2022
@cjgillot
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Feb 28, 2022

📌 Commit 6dcf5d8 has been approved by cjgillot

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 28, 2022
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Feb 28, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 1, 2022
Rollup of 7 pull requests

Successful merges:

 - rust-lang#91545 (Generalize "remove `&`"  and "add `*`" suggestions to more than one deref)
 - rust-lang#93385 (Rustdoc ty consistency fixes)
 - rust-lang#93926 (Lint against more useless `#[must_use]` attributes)
 - rust-lang#94094 (use BOOL for TCP_NODELAY setsockopt value on Windows)
 - rust-lang#94384 (Add Atomic*::from_mut_slice)
 - rust-lang#94448 (5 - Make more use of `let_chains`)
 - rust-lang#94452 (Sync portable-simd for bitmasks &c.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit daed864 into rust-lang:master Mar 1, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 1, 2022
@PatchMixolydic PatchMixolydic deleted the bugfix/must_use-on-exprs branch March 1, 2022 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compilation warning does not appear even if #[must_use] is used in a non-function.
9 participants