From fbbcb089c52e6dce88600be36a1cc97884294d4f Mon Sep 17 00:00:00 2001 From: Will Crichton Date: Fri, 11 Feb 2022 21:48:59 -0800 Subject: Add --scrape-tests flags so rustdoc can scrape examples from tests --- src/doc/rustdoc/src/unstable-features.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/doc/rustdoc') diff --git a/src/doc/rustdoc/src/unstable-features.md b/src/doc/rustdoc/src/unstable-features.md index d60be193bda..c7fd5ed6fcb 100644 --- a/src/doc/rustdoc/src/unstable-features.md +++ b/src/doc/rustdoc/src/unstable-features.md @@ -509,3 +509,6 @@ reverse-dependency like `examples/ex.rs` is given to rustdoc with the target crate being documented (`foobar`) and a path to output the calls (`output.calls`). Then, the generated calls file can be passed via `--with-examples` to the subsequent documentation of `foobar`. + +To scrape examples from test code, e.g. functions marked `#[test]`, then +add the `--scrape-tests` flag. -- cgit 1.4.1-3-g733a5