8000 Add guidelines about writing documentation by GuillaumeGomez · Pull Request #35 · rust-lang/std-dev-guide · GitHub
[go: up one dir, main page]

Skip to content

Add guidelines about writing documentation #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 31, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add guideline about "reviewing doc changes"
  • Loading branch information
GuillaumeGomez committed May 31, 2022
commit ff0461e634214be28c24356838bb48930d82943f
1 change: 1 addition & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
- [doc alias policy](./documentation/doc-alias-policy.md)
- [safety comments policy](./documentation/safety-comments.md)
- [how to write documentation](./how-to-write-documentation.md)
- [reviewing doc changes](./reviewing-doc-changes.md)

---

Expand Down
24 changes: 24 additions & 0 deletions src/documentation/reviewing-doc-changes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Reviewing doc changes

Most of the time, it is mostly reviewing that the documentation isn't wrong
in any way and that it follows the
[how to write documentation](./how-to-write-documentation.md) guideline.

There is however something where we need to be extra careful: stability
guarantees.

## Stability guarantees

First, short explanation about what a stability guarantee is: a statement in
the document which explains what the item is doing in a precise case. For
example:

* Showing precisely how a function on floats handles `NaN`.
* Saying that a sort method has a particular running-time bound.

So if a doc change updates/adds/removes a stability guarantee, it has to be
**very** carefully handled and needs to go through the
[libs API team FCP](https://rustc-dev-guide.rust-lang.org/stabilization_guide.html?highlight=fcp#fcp).

It can be circumvented by adding a `# Current Implementation` section
[like done here](https://github.com/rust-lang/rust/blob/4a8d2e3856c0c75c71998b6c85937203839b946d/library/alloc/src/slice.rs#L250).
1 change: 1 addition & 0 deletions src/documentation/summary.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- [doc alias policy](./doc-alias-policy.md)
- [safety comments policy](./safety-comments.md)
- [how to write documentation](./how-to-write-documentation.md)
- [reviewing doc changes](./reviewing-doc-changes.md)
0