Uh oh!
There was an error while loading. Please reload this page.
Remove unused #[must_use] - #145274
Merged
Merged
Conversation
rustbot
commented
Aug 11, 2025
Collaborator
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
rustbot
commented
Aug 11, 2025
Collaborator
Some changes occurred in compiler/rustc_passes/src/check_attr.rs |
| } | ||
| let s = PatternField { #[must_use] foo: 123 }; //~ ERROR `#[must_use]` has no effect | ||
| let PatternField { #[must_use] foo } = s; //~ ERROR `#[must_use]` has no effect | ||
| let _ = foo; |
ContributorAuthor
There was a problem hiding this comment.
@run-rustfix requires that all warnings are gone, and foo is unused, so I'm suppressing it here.
fmease
approved these changes
Aug 11, 2025
fmease
commented
Aug 11, 2025
Member
Thenks!~ r? fmease @bors r+ rollup |
bors
commented
Aug 11, 2025
Collaborator
This comment has been minimized.
This comment has been minimized.
fmease
commented
Aug 11, 2025
Member
@bors r- |
compiler-errors
commented
Aug 11, 2025
ContributorAuthor
Will bless when I am back at my computer |
compiler-errorsforce-pushed
the
unused-must-use
branch
from
August 12, 2025 19:55
6c571e7 to
2c0409cComparefmease
commented
Aug 12, 2025
Member
@bors r+ |
bors
commented
Aug 12, 2025
Collaborator
bors added a commit
that referenced
this pull request
Aug 13, 2025
Rollup of 11 pull requests Successful merges: - #143467 (Add ASCII-related methods from `u8` and `MIN`/`MAX` to `core::ascii::Char`) - #144519 (Constify `SystemTime` methods) - #144642 (editorconfig: don't trim trailing whitespace in tests) - #144870 (Stabilize `path_file_prefix` feature) - #145269 (Deprecate RUST_TEST_* env variables) - #145274 (Remove unused `#[must_use]`) - #145289 (chore(ci): upgrade checkout to v5) - #145303 (Docs: Link to payload_as_str() from payload().) - #145308 (Adjust documentation of `dangling`) - #145320 (Allow cross-compiling the Cranelift dist component) - #145325 (Add `cast_init` and `cast_uninit` methods for pointers) r? `@ghost` `@rustbot` modify labels: rollup
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 13, 2025
Zalathar added a commit
to Zalathar/rust
that referenced
this pull request
Aug 18, 2025
…=jdonszelmann Port must_use to the new target checking This PR ports `must_use` to the new target checking logic This also adds a tool-only suggestion to remove attributes on invalid targets, as to not immediately undo the work of rust-lang#145274 r? ``@jdonszelmann``
Zalathar added a commit
to Zalathar/rust
that referenced
this pull request
Aug 18, 2025
…=jdonszelmann Port must_use to the new target checking This PR ports `must_use` to the new target checking logic This also adds a tool-only suggestion to remove attributes on invalid targets, as to not immediately undo the work of rust-lang#145274 r? ```@jdonszelmann```
jieyouxu added a commit
to jieyouxu/rust
that referenced
this pull request
Aug 19, 2025
…=jdonszelmann Port must_use to the new target checking This PR ports `must_use` to the new target checking logic This also adds a tool-only suggestion to remove attributes on invalid targets, as to not immediately undo the work of rust-lang#145274 r? `@jdonszelmann`
rust-timer added a commit
that referenced
this pull request
Aug 19, 2025
Rollup merge of #145500 - JonathanBrouwer:must_use_target, r=jdonszelmann Port must_use to the new target checking This PR ports `must_use` to the new target checking logic This also adds a tool-only suggestion to remove attributes on invalid targets, as to not immediately undo the work of #145274 r? `@jdonszelmann`
github-actionsBot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Aug 20, 2025
…mann Port must_use to the new target checking This PR ports `must_use` to the new target checking logic This also adds a tool-only suggestion to remove attributes on invalid targets, as to not immediately undo the work of rust-lang/rust#145274 r? `@jdonszelmann`
github-actionsBot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Aug 25, 2025
…mann Port must_use to the new target checking This PR ports `must_use` to the new target checking logic This also adds a tool-only suggestion to remove attributes on invalid targets, as to not immediately undo the work of rust-lang/rust#145274 r? `@jdonszelmann`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Self-explanatory
Fixes#145257