Rustdoc: distinguish provided methods on trait impls #48069
Labels
A-traits
Area: Trait system
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.
Currently, if a trait impl uses a provided method's default implementation, there is no easy way to tell directly from the rustdoc. For instance, see the
Write for Vec<u8>
impl block. The first three methods are implemented byVec<u8>
, while the other two use the default implementation. Of the ones implemented byVec<u8>
,write_all
overrides a default implementation while the other two are required.Ideally, we would have some small way to distinguish between provided, overridden, and required methods in the trait impl blocks. While it isn't useful for normal documentation practices, it is useful for educational purposes (e.g. if I want to see how a type implements a trait, I can know to ignore provided methods) as well as debugging, if I have different levels of trust for the trait author and implementor.
The text was updated successfully, but these errors were encountered: