]> git.lizzy.rs Git - rust.git/commitdiff
Make note of documentation tests and binaries
authorSteve Klabnik <steve@steveklabnik.com>
Thu, 16 Apr 2015 19:55:10 +0000 (15:55 -0400)
committerSteve Klabnik <steve@steveklabnik.com>
Fri, 17 Apr 2015 03:50:16 +0000 (23:50 -0400)
Fixes #24228

src/doc/trpl/documentation.md

index 9c56ab11dbcca11808b63f2230ebc0e7545732f9..732521a0c6064d99ee74d9a5894410c64bf2553e 100644 (file)
@@ -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: