diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2016-07-06 19:13:08 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-06 19:13:08 -0400 |
| commit | 8c3efd20e436d31e5b8d01bfdc879fa57381d999 (patch) | |
| tree | 24f29b128364fafa50fc15f12b18b0ab6d3e1deb | |
| parent | f8905e1e014b319497007662f186b87146fa543f (diff) | |
| parent | 159d1ab540cd53f1e63db0e00a50180d535a8bce (diff) | |
Rollup merge of #34667 - KaivoAnastetiks:fix/crate-documentation, r=Manishearth
Add a section about crate documentation. Fixes #34329 ?r @steveklabnik
| -rw-r--r-- | src/doc/book/documentation.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/doc/book/documentation.md b/src/doc/book/documentation.md index 3c6643fbfe1..6292ba9aac4 100644 --- a/src/doc/book/documentation.md +++ b/src/doc/book/documentation.md @@ -486,6 +486,17 @@ you have a module in `foo.rs`, you'll often open its code and see this: //! The `foo` module contains a lot of useful functionality blah blah blah ``` +### Crate documentation + +Crates can be documented by placing an inner doc comment (`//!`) at the +beginning of the crate root, aka `lib.rs`: + +```rust +//! This is documentation for the `foo` crate. +//! +//! The foo crate is meant to be used for bar. +``` + ### Documentation comment style Check out [RFC 505][rfc505] for full conventions around the style and format of |
