Skip to content

rustdoc documentation deserves more prominent coverage #2737

Open
@ericseppanen

Description

@ericseppanen

A colleague new to Rust didn't know what /// comments were, and were surprised that they hadn't seen them in the Rust Book. I was quite surprised at this: I think proper code documentation deserves a more prominent placement.

Section 3.4 ("Comments") doesn't mention rustdoc comments or ///.
Chapter 11 ("Writing Automated Tests") doesn't mention doctests.

They are mentioned in section 14.2 ("Publishing a Crate to Crates.io"), but that's a section new people are very likely to skip over. It's also wedged between "Customizing Builds with Release Profiles" and "Cargo Workspaces", so it's clearly not a chapter for beginners.

This is a missed opportunity, because consistently documented code is a good idea everywhere, and starts long before code gets published to the world.

None of the code examples in other chapters contain rustdoc comments, which is another missed chance to set a good example.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions