rustdoc: indicate when a trait has non-defaulted hidden items #138697
Labels
A-rustdoc-ui
Area: Rustdoc UI (generated HTML)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
T-rustdoc-frontend
Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
There’s a pattern of hiding a non-defaulted item in a trait to mark it as non-implementable, e.g.
inventory::Collect
:https://github.com/dtolnay/inventory/blob/5e915d4d197432b73375ad21e08a1ee8275d8309/src/lib.rs#L224-L227
This is primarily useful when a trait is implemented by a macro, so it can’t be properly sealed, but still needs to be only implementable by code “originating” in the same crate. It has some similarity with
#[non_exhaustive]
attribute.Some options on how this could look:
The text was updated successfully, but these errors were encountered: