Skip to content

Add documentation for all keywords like the primitive types' documentation #34601

Closed
@carols10cents

Description

@carols10cents

Here's what I would like to be able to do:

  • Visit http://doc.rust-lang.org/std/
  • In the search box, type any keyword, such as match
  • Get back comprehensive documentation about match's functionality, similar to the documentation for the primitive types (ex: pointer)

For unused but reserved keywords, I would expect to see something along the lines of "This keyword has no current functionality but is reserved for Rust to possibly use in the future."

Why this is important

Currently, all the details about pattern matching syntax is only documented in the book, as far as I can tell. In the new version of the book, we're moving away from trying to be comprehensive towards just covering the most important, most commonly used constructs. But if we remove documentation about, say, the precedence of | and match guards, where will people go to learn about it? (The Reference doesn't have anything about that stuff either).

Furthermore, how is a new rustacean supposed to know that, say, i32 and pointer will return results but match and where will not?

I'm going to research how the primitive types are documented, but wanted to file this for discussion purposes in the meantime.

Metadata

Metadata

Labels

A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.P-mediumMedium priorityT-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions