Skip to content

Comments

unused_must_use lint improvements#153018

Open
WaffleLapkin wants to merge 6 commits intorust-lang:mainfrom
WaffleLapkin:must_use_improvements
Open

unused_must_use lint improvements#153018
WaffleLapkin wants to merge 6 commits intorust-lang:mainfrom
WaffleLapkin:must_use_improvements

Conversation

@WaffleLapkin
Copy link
Member

@WaffleLapkin WaffleLapkin commented Feb 23, 2026

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 #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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 23, 2026
@WaffleLapkin WaffleLapkin added the relnotes Marks issues that should be documented in the release notes of the next release. label Feb 23, 2026
@rust-log-analyzer

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.
@jdonszelmann
Copy link
Contributor

@rustbot author

@rustbot rustbot 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 23, 2026
@jdonszelmann
Copy link
Contributor

@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 23, 2026

📌 Commit 1b97e9b has been approved by jdonszelmann

It is now in the queue for this repository.

@rust-bors rust-bors bot 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 23, 2026
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.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotes Marks issues that should be documented in the release notes of the next release. 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.

4 participants