rust-clippy icon indicating copy to clipboard operation
rust-clippy copied to clipboard

Remove the pre-expansion pass

Open Alexendoo opened this issue 2 months ago • 6 comments

Fixes https://github.com/rust-lang/rust-clippy/issues/13007

~~deprecated_cfg_attr now also lints inner attributes since it can catch the crate level ones, the suggestion is now MaybeIncorrect as there were some existing cases where the suggestion isn't valid and this adds some new ones~~

deprecated_clippy_cfg_attr uses stripped_cfg_items in addition to a regular early pass as it will typically be in a cfg that evaluates to false

non_minimal_cfg can't use stripped_cfg_items here though since it only stores the part of the cfg that evaluated to false whereas the lint needs the wider context, this means the lint no longer fires on code that is cfgd out, which may or may not be expected

non_minimal_cfg now also lints cfg_attr conditions and lints both empty any() and all(), suggesting to replace them with true/false as long as the MSRV is 1.88 (https://github.com/rust-lang/rust/pull/138632)

changelog: [non_minimal_cfg] now lints empty any() and conditions in #[cfg_attr]s

Alexendoo avatar Oct 29 '25 15:10 Alexendoo

r? @y21

rustbot has assigned @y21. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

rustbot avatar Oct 29 '25 15:10 rustbot

Lintcheck changes for ddc2f297ce65df8e227565de0fee311620cb05be

Lint Added Removed Changed
clippy::deprecated_clippy_cfg_attr 14 0 0

This comment will be updated if you push new changes

github-actions[bot] avatar Oct 29 '25 15:10 github-actions[bot]

:umbrella: The latest upstream changes (possibly c48592eb49d984aee2f813336e2363798e004119) made this pull request unmergeable. Please resolve the merge conflicts.

rustbot avatar Nov 14 '25 14:11 rustbot

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

rustbot avatar Nov 27 '25 18:11 rustbot

:umbrella: The latest upstream changes (possibly 64f43bf6dc41ac9474df9ad161d21fdff49f41fd) made this pull request unmergeable. Please resolve the merge conflicts.

rustbot avatar Dec 05 '25 15:12 rustbot

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

rustbot avatar Dec 05 '25 16:12 rustbot