-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.L-dead_codeLint: dead_codeLint: dead_codeT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
When this setting is true, dead_code
would analyze an entire workspace, checking that all code is used somewhere in the workspace.
This is particularly useful in projects that have libraries (for compilation speed or modularity reasons) that are never intended to be published. In those cases, it's easy to accidentally forget to remove dead code, as pub
library types and traits and functions and constants are exempted.
With the addition of workspace-level lint controls, this feels like it may actually be possible. #74970 is related, but only targets binary crates.
ian-h-chamberlain, jungnitz and GeeWee
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.L-dead_codeLint: dead_codeLint: dead_codeT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.