unused_must_use lint improvements#153018
Open
WaffleLapkin wants to merge 6 commits intorust-lang:mainfrom
Open
unused_must_use lint improvements#153018WaffleLapkin wants to merge 6 commits intorust-lang:mainfrom
unused_must_use lint improvements#153018WaffleLapkin wants to merge 6 commits intorust-lang:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This removes `Suppressed` as a must use cause that could be nested in another (we did not ever return this, but now it's encoded in the types). I also renamed Suppressed->Trvial and added some docs to clear confusion.
…nd `ControlFlow<Uninhabited, T>`
63986fe to
1b97e9b
Compare
Contributor
|
@rustbot author |
Contributor
|
@bors r+ rollup |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Feb 24, 2026
…, r=jdonszelmann `unused_must_use` lint improvements The main purpose of this is to allow clippy to use `is_ty_must_use` from rustc, rather than making their own (outdated) copy. This also adds changes from rust-lang#148214 under a function flag, so clippy can start linting with the new semantics in mind, while rustc doesn't yet (see rust-lang#148214 (comment)). I've also done some refactoring while I was at it. r? @jdonszelmann
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Feb 24, 2026
…, r=jdonszelmann `unused_must_use` lint improvements The main purpose of this is to allow clippy to use `is_ty_must_use` from rustc, rather than making their own (outdated) copy. This also adds changes from rust-lang#148214 under a function flag, so clippy can start linting with the new semantics in mind, while rustc doesn't yet (see rust-lang#148214 (comment)). I've also done some refactoring while I was at it. r? @jdonszelmann
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Feb 24, 2026
…, r=jdonszelmann `unused_must_use` lint improvements The main purpose of this is to allow clippy to use `is_ty_must_use` from rustc, rather than making their own (outdated) copy. This also adds changes from rust-lang#148214 under a function flag, so clippy can start linting with the new semantics in mind, while rustc doesn't yet (see rust-lang#148214 (comment)). I've also done some refactoring while I was at it. r? @jdonszelmann
rust-bors bot
pushed a commit
that referenced
this pull request
Feb 24, 2026
…uwer Rollup of 15 pull requests Successful merges: - #152176 (Neon fast path for str::contains) - #152657 (std: move `exit` out of PAL) - #152841 (Streamline `QueryVTableUnerased` into `GetQueryVTable`) - #152845 (Skip `tidy` in PR CI jobs not dedicated to running `tidy`) - #152897 (Add optional json logging) - #153009 (Remove `rustc_feedable_queries` and `define_feedable` macros.) - #151558 (Port diagnostic attributes) - #152492 (mGCA: Enforce WF element types for array valtrees) - #152888 (Fix async drop glue MIR bug) - #152988 (Port `#[register_tool]` to the new attribute system) - #153018 (`unused_must_use` lint improvements) - #153023 (Update books) - #153033 (Clarify how "ensure" queries check whether they can skip execution) - #153043 (fix error on missing value for -C flags) - #153045 (rustc-dev-guide subtree update) Failed merges: - #153032 (Fix attribute parser and kind names.)
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 free
to 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.
The main purpose of this is to allow clippy to use
is_ty_must_usefrom rustc, rather than making their own (outdated) copy. This also adds changes from #148214 under a function flag, so clippy can start linting with the new semantics in mind, while rustc doesn't yet (see #148214 (comment)).I've also done some refactoring while I was at it.
r? @jdonszelmann