Skip to content

Conversation

@syphar
Copy link
Member

@syphar syphar commented Nov 28, 2025

No description provided.

@syphar syphar requested a review from a team as a code owner November 28, 2025 06:40
@syphar syphar self-assigned this Nov 28, 2025
@github-actions github-actions bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Nov 28, 2025
@GuillaumeGomez
Copy link
Member

Thanks! I'm surprised there is no warning for unused dependencies.

@GuillaumeGomez GuillaumeGomez merged commit b989c0e into rust-lang:main Nov 28, 2025
15 checks passed
@GuillaumeGomez GuillaumeGomez deleted the unused-deps branch November 28, 2025 10:12
@github-actions github-actions bot added S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Nov 28, 2025
@syphar
Copy link
Member Author

syphar commented Nov 28, 2025

Thanks! I'm surprised there is no warning for unused dependencies.

I think it's tricky to find out.

there are three tools which could report this, all have different kinds of false positives or negatives.

For example: phf was reported as unused by all, but we use it in code we generate in the build-script

@GuillaumeGomez
Copy link
Member

cargo passes them to rustc. So it's strictly equivalent to having extern crate in the source code, like an import. So rustc has the information.

For example: phf was reported as unused by all, but we use it in code we generate in the build-script

Rustc should only care about compiled code, so I'm surprised it would complain about a used dep.

@syphar syphar removed the S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it label Dec 2, 2025
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