about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2015-04-16 15:55:10 -0400
committerSteve Klabnik <steve@steveklabnik.com>2015-04-16 23:50:16 -0400
commitdc4554a9b347aaaef87a0093375657e7d5176a34 (patch)
treea06940a92759f4c484c2924bb416e6e434c19152
parenta2ccc81f4be5e8df81a72f5cc6c10ca267b0fc08 (diff)
downloadrust-dc4554a9b347aaaef87a0093375657e7d5176a34.tar.gz
rust-dc4554a9b347aaaef87a0093375657e7d5176a34.zip
Make note of documentation tests and binaries
Fixes #24228
-rw-r--r--src/doc/trpl/documentation.md5
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: