-
-
Notifications
You must be signed in to change notification settings - Fork 16k
exported_private_dependencies lint ignores const generics #161664
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-visibilityArea: Visibility / privacyArea: Visibility / privacyF-public_private_dependenciesfeature: public_private_dependenciesfeature: public_private_dependenciesL-exported_private_dependenciesLint: exported_private_dependenciesLint: exported_private_dependenciesT-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
Activity
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-visibilityArea: Visibility / privacyArea: Visibility / privacyF-public_private_dependenciesfeature: public_private_dependenciesfeature: public_private_dependenciesL-exported_private_dependenciesLint: exported_private_dependenciesLint: exported_private_dependenciesT-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.
Code
Current output
Desired output
Rationale and extra context
We're linting on the same thing if it's normal generic instead of const generic. I believe this exposes the private dependency because it could change the constant which would change our public interface.
Similar issue for const generics also exist in reexports of const generic structs, implementations on those structs, implementation of const generic traits and so on.
The re-export lint correctly identifies constants from private dependencies.
Other cases
Rust Version
Anything else?
Tracking issue for the lint #44663
@rustbot label +F-public_private_dependencies +L-exported_private_dependencies +A-lints +A-visibility
Changes to this lint are currently reviewed in #160726 but it doesn't change this.