We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ab51427 + c776d02 commit 6146edaCopy full SHA for 6146eda
src/doc/trpl/documentation.md
@@ -380,7 +380,10 @@ $ rustdoc --test path/to/my/crate/root.rs
380
$ cargo test
381
```
382
383
-That's right, `cargo test` tests embedded documentation too.
+That's right, `cargo test` tests embedded documentation too. However,
384
+`cargo test` will not test binary crates, only library ones. This is
385
+due to the way `rustdoc` works: it links against the library to be tested,
386
+but with a binary, there’s nothing to link to.
387
388
There are a few more annotations that are useful to help `rustdoc` do the right
389
thing when testing your code:
0 commit comments