about summary refs log tree commit diff
path: root/src/test/rustdoc/tuple-struct-fields-doc.rs
diff options
context:
space:
mode:
authorNoah Lev <camelidcamel@gmail.com>2022-08-13 00:56:16 -0400
committerNoah Lev <camelidcamel@gmail.com>2022-08-13 00:56:16 -0400
commit0d588e928e7db77f9a810b1b5de02521dbf5ee5e (patch)
tree471a099d3bb3758f804a4f9a15f2144e7d4ecb42 /src/test/rustdoc/tuple-struct-fields-doc.rs
parentb34e2404fd375e1bc18c1191639e4e67bdbc7d19 (diff)
downloadrust-0d588e928e7db77f9a810b1b5de02521dbf5ee5e.tar.gz
rust-0d588e928e7db77f9a810b1b5de02521dbf5ee5e.zip
rustdoc: Fix incorrect usage of `@!has` and `@!matches`
`@!has` (and `@!matches`) with two arguments used to treat the second
argument as a literal string of HTML code. Now, that feature has been
renamed into `@!hasraw` (and `@!matchesraw`), and the arity-2 `@!has`
version is an error.

These uses thought the second argument was being treated as an XPath, as
with the arity-3 version, but in fact was being treated as literal HTML.
Because these were checking for the *absence* of the string, the tests
silently did nothing -- an XPath string won't ever be showing up in the
test's generated HTML!
Diffstat (limited to 'src/test/rustdoc/tuple-struct-fields-doc.rs')
-rw-r--r--src/test/rustdoc/tuple-struct-fields-doc.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/rustdoc/tuple-struct-fields-doc.rs b/src/test/rustdoc/tuple-struct-fields-doc.rs
index b5a90043395..66bb409325c 100644
--- a/src/test/rustdoc/tuple-struct-fields-doc.rs
+++ b/src/test/rustdoc/tuple-struct-fields-doc.rs
@@ -5,7 +5,7 @@
 // @has - '//h3[@class="sidebar-title"]/a[@href="#fields"]' 'Tuple Fields'
 // @has - '//*[@id="structfield.0"]' '0: u32'
 // @has - '//*[@id="main-content"]/div[@class="docblock"]' 'hello'
-// @!hasraw - '//*[@id="structfield.1"]'
+// @!has - '//*[@id="structfield.1"]' ''
 // @has - '//*[@id="structfield.2"]' '2: char'
 // @has - '//*[@id="structfield.3"]' '3: i8'
 // @has - '//*[@id="main-content"]/div[@class="docblock"]' 'not hello'