Skip to content

Commit

Permalink
Add a section about crate documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeRochat committed Jul 5, 2016
1 parent 8a50e29 commit 159d1ab
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/doc/book/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 159d1ab

Please sign in to comment.