-
Notifications
You must be signed in to change notification settings - Fork 176
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
Document traits as either sealed or implementable #4338
Comments
We need to decide both for CldrCalendar specifically and the language/code for the more general case. Assigned to @Manishearth for the purpose of making a proposal. |
For sealing traits I would suggest that we just use the typical If we need a trait to be implementable across crate boundaries, the For CldrCalendar specifically I think we should seal it and mark every method as Approval: |
I like the overall shape of this. Question: when you say "use the typical I remain concerned with the proliferation of
For the question in this thread, I am LGTM to make cross-crate-boundary-implementable sealed traits be "marked as internal using a convention which we decide elsewhere", not specifically |
One per crate, does not matter where it lives because it is private. And yes, it is just not exported.
Yeah I think so. Though we have a lot of internal APIs we need to unconditionally make public like provider APIs.
Worth considering using document-private-items.
To be clear, I'm only suggestion |
@sffc quick ping on approving this or moving the discussion forward |
Yeah I approve and have already been doing this for example in the |
Just like we document structs and enums as either exhaustive or non-exhaustive, we should document traits as either sealed or implementable.
For sealed traits, we could add a
__sealed()
function, and add a slab like this to the docs:Unclear if there is a Clippy lint to enforce this.
The text was updated successfully, but these errors were encountered: