diff options
| author | Kaivo Anastetiks <kaivoanastetiks@gmail.com> | 2016-07-05 13:17:16 -0400 |
|---|---|---|
| committer | Kaivo Anastetiks <kaivoanastetiks@gmail.com> | 2016-07-05 13:17:16 -0400 |
| commit | 159d1ab540cd53f1e63db0e00a50180d535a8bce (patch) | |
| tree | 8f860e28d4aabbc02f0e4456ce7afba2e8c8603c | |
| parent | 8a50e295fa2f3e550e1c9c19e1a9cadb6323ff40 (diff) | |
| download | rust-159d1ab540cd53f1e63db0e00a50180d535a8bce.tar.gz rust-159d1ab540cd53f1e63db0e00a50180d535a8bce.zip | |
Add a section about crate documentation.
| -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 |
