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

Support "doc-hidden-sealed" trait analysis and related lints #999

Open
2 tasks
obi1kenobi opened this issue Nov 20, 2024 · 0 comments
Open
2 tasks

Support "doc-hidden-sealed" trait analysis and related lints #999

obi1kenobi opened this issue Nov 20, 2024 · 0 comments
Labels
C-enhancement Category: raise the bar on expectations

Comments

@obi1kenobi
Copy link
Owner

A sealed trait is one that absolutely cannot be implemented by a downstream crate.

A doc-hidden-sealed trait is one that shouldn't be implemented by a downstream crate, as the implementation would require using or implementing #[doc(hidden)] items. This means downstream crates are technically able to implement such traits, but such implementations rely on non-public API and may be broken without notice in non-major releases.

That means the space of traits is split into three disjoint sets: sealed, doc-hidden-sealed, and non-sealed.

Instances of the problem addressed here are: #997, #953.

We need to:

  • work out the exact rules for when a trait is doc-hidden-sealed
  • figure out how to reframe existing lints and add new lints to work together with this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: raise the bar on expectations
Projects
None yet
Development

No branches or pull requests

1 participant