diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2015-04-16 15:55:10 -0400 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2015-04-16 23:50:16 -0400 |
| commit | dc4554a9b347aaaef87a0093375657e7d5176a34 (patch) | |
| tree | a06940a92759f4c484c2924bb416e6e434c19152 | |
| parent | a2ccc81f4be5e8df81a72f5cc6c10ca267b0fc08 (diff) | |
| download | rust-dc4554a9b347aaaef87a0093375657e7d5176a34.tar.gz rust-dc4554a9b347aaaef87a0093375657e7d5176a34.zip | |
Make note of documentation tests and binaries
Fixes #24228
| -rw-r--r-- | src/doc/trpl/documentation.md | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/doc/trpl/documentation.md b/src/doc/trpl/documentation.md index 9c56ab11dbc..732521a0c60 100644 --- a/src/doc/trpl/documentation.md +++ b/src/doc/trpl/documentation.md @@ -380,7 +380,10 @@ $ rustdoc --test path/to/my/crate/root.rs $ cargo test ``` -That's right, `cargo test` tests embedded documentation too. +That's right, `cargo test` tests embedded documentation too. However, +`cargo test` will not test binary crates, only library ones. This is +due to the way `rustdoc` works: it links against the library to be tested, +but with a binary, there’s nothing to link to. There are a few more annotations that are useful to help `rustdoc` do the right thing when testing your code: |
