Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not trigger redundant_pub_crate in external macros #13952

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

samueltardieu
Copy link
Contributor

@samueltardieu samueltardieu commented Jan 6, 2025

Some widely used crates, such as pin-project-lite, make use of a pub(crate) construct in a private module inside a public macro. This makes unrelated project trigger the lint.

There is also an unfortunate situation for Clippy itself: when a new version of pin-project-lite or similar lint-trigerring crates is released, those lints which can be found in hundreds of occurrences in dependent crates will change, and appear as diffs in unrelated Clippy PR because the base lintcheck run will be cached with the ancient release of the crates. We currently have the situation here, which 219 lints removed and 219 lints added because of a pin-project-lite version change between runs, and the fact that redundant_pub_crate triggers on external macros.

Also:

changelog: [redundant_pub_crate]: do not trigger on external macros

@rustbot
Copy link
Collaborator

rustbot commented Jan 6, 2025

r? @Centri3

rustbot has assigned @Centri3.
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 rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jan 6, 2025
@samueltardieu
Copy link
Contributor Author

samueltardieu commented Jan 6, 2025

Wow, 244 instances of the lint removed in the current PR lintcheck run. 🎆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
3 participants