Stream: rustdoc

Topic: Marking default implementations on trait functions


view this post on Zulip Christopher Jefferson (Jul 27 2021 at 08:27):

(Sorry if I'm in the wrong place)

Only today did I discover that { ... } under a function in a trait in rustdoc means "This function has a default implementation". I realise this makes sense if you think of the doc as actual code, but I missed it.

Perhaps this could be made more obvious, perhaps something like { ... /* default implementation */ } ?

view this post on Zulip GuillaumeGomez (Jul 27 2021 at 08:43):

Or even { /* default implementation */ }. But otherwise I think it's a good idea!

view this post on Zulip GuillaumeGomez (Jul 27 2021 at 08:44):

Please open an issue on rust-lang/rust repository. If you want you can make the implementation as well, I think it'd be easy. ;)


Last updated: Oct 21 2021 at 21:46 UTC