Skip to content

Use #[must_use] determination from the compiler#16633

Draft
samueltardieu wants to merge 1 commit intorust-lang:masterfrom
samueltardieu:features/must-use-from-compiler
Draft

Use #[must_use] determination from the compiler#16633
samueltardieu wants to merge 1 commit intorust-lang:masterfrom
samueltardieu:features/must-use-from-compiler

Conversation

@samueltardieu
Copy link
Member

@samueltardieu samueltardieu commented Feb 24, 2026

changelog: better determination of #[must_use] needs by directly using the compiler algorithm

This still needs some work to provide better error message in the case of the double_must_use lint: users might not know that some types such as Box will forward the #[must_use] status form their payload.

@rustbot

This comment has been minimized.

@samueltardieu samueltardieu force-pushed the features/must-use-from-compiler branch from 35d95f3 to 7392cc1 Compare March 5, 2026 16:57
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Lintcheck changes for e083a22

Lint Added Removed Changed
clippy::double_must_use 4 0 0
clippy::must_use_candidate 1 4 1

This comment will be updated if you push new changes

@samueltardieu samueltardieu force-pushed the features/must-use-from-compiler branch from 7392cc1 to e083a22 Compare March 5, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants