Skip to content

Commit a172f23

Browse files
committed
htmldocck: expand limitations and mention compiletest directives
1 parent 3668c36 commit a172f23

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/doc/rustc-dev-guide/src/rustdoc-internals/htmldocck.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ This page is specifically about the `rustdoc` test suite, for other test suites
99
## Directives
1010
Directives to htmldocck are similar to those given to `compiletest` in that they take the form of `//@` comments.
1111

12+
In addition to the directives listed here,
13+
`rustdoc` tests also support most
14+
[compiletest directives](../tests/directives.html).
15+
1216
All `PATH`s in directives are relative to the the rustdoc output directory (`build/TARGET/test/rustdoc/TESTNAME`),
1317
so it is conventional to use a `#![crate_name = "foo"]` attribute to avoid writing paths.
1418
To avoid repetion, `-` can be used in any `PATH` argument to re-use the previous `PATH` argument.
@@ -95,7 +99,9 @@ Example: `//@ files "foo/bar" '["index.html", "sidebar-items.js"]'`
9599
[^1]: Whitespace normalization means that all spans of consecutive whitespace are replaced with a single space. The files themselves are also whitespace-normalized.
96100

97101
## Limitations
98-
All `XPATH` arguments must start with `//` due to a flaw in the implemention.
99-
100-
Only well-formed HTML can be parsed (hopefully rustdoc doesn't output mismatched tags).
102+
`htmldocck.py` uses the xpath implementation from the standard library.
103+
This leads to several limitations:
104+
* All `XPATH` arguments must start with `//` due to a flaw in the implemention.
105+
* Many XPath features (functions, axies, etc.) are not supported.
106+
* Only well-formed HTML can be parsed (hopefully rustdoc doesn't output mismatched tags).
101107

0 commit comments

Comments
 (0)