From f36f645daf1dfef9ac28ce5c32261c0e0e8df6f7 Mon Sep 17 00:00:00 2001 From: Alexis Bourget Date: Thu, 12 Nov 2020 00:45:34 +0100 Subject: [PATCH] Links to htmldocck/@has/matches for searchability --- src/rustdoc-internals.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/rustdoc-internals.md b/src/rustdoc-internals.md index f9c37ecd..1f7f1004 100644 --- a/src/rustdoc-internals.md +++ b/src/rustdoc-internals.md @@ -177,7 +177,8 @@ a set of tests in `src/test/rustdoc` that make sure the final HTML is what we expect in various situations. These tests also use a supplementary script, `src/etc/htmldocck.py`, that allows it to look through the final HTML using XPath notation to get a precise look at the output. The full description of all -the commands available to rustdoc tests is in `htmldocck.py`. +the commands available to rustdoc tests (e.g. [`@has`] and [`@matches`]) is in +[`htmldocck.py`]. To use multiple crates in a rustdoc test, add `// aux-build:filename.rs` to the top of the test file. `filename.rs` should be placed in an `auxiliary` @@ -193,6 +194,10 @@ that features results in all tabs can be found in `basic.js`. The basic idea is that you match a given `QUERY` with a set of `EXPECTED` results, complete with the full item path of each item. +[`htmldocck.py`]: https://github.com/rust-lang/rust/blob/master/src/etc/htmldocck.py +[`@has`]: https://github.com/rust-lang/rust/blob/master/src/etc/htmldocck.py#L39 +[`@matches`]: https://github.com/rust-lang/rust/blob/master/src/etc/htmldocck.py#L44 + ## Testing locally Some features of the generated HTML documentation might require local