about summary refs log tree commit diff
path: root/src/test/rustdoc-js-std/multi-query.js
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2021-07-13 17:41:03 -0400
committerJoshua Nelson <jyn514@gmail.com>2021-09-12 02:30:24 +0000
commit7b469202183c1b29db813be42614ef994c099aca (patch)
treecc525e7bdbcb40a7c27842e4d3bd1bc0bfabe53f /src/test/rustdoc-js-std/multi-query.js
parentcb7e527692bd01c68f01fd373db0c49dbc8670ce (diff)
downloadrust-7b469202183c1b29db813be42614ef994c099aca.tar.gz
rust-7b469202183c1b29db813be42614ef994c099aca.zip
Fix linkcheck issues
Most of these are because alloc uses `#[lang_item]` to define methods,
but core documents primitives before those methods are available.

- Fix rustdoc-js-std test

  For some reason this change made CStr not show up in the results for
  `str,u8`. Since it still shows up for str, and since it wasn't a great
  match for that query anyway, I think this is ok to let slide.

- Add test that all primitives can be linked to
- Enable `doc(primitive)` in `core` as well
- Add linkcheck exception specifically for Windows

  Ideally this would be done automatically by the linkchecker by
  replacing `\\` with forward slashes, but this PR is already a ton of
  work ...

- Don't forcibly fail linkchecking if there's a broken intra-doc link on Windows

  Previously, it would exit with a hard error if a missing file had `::`
  in it. This changes it to report a missing file instead, which allows
  adding an exception.
Diffstat (limited to 'src/test/rustdoc-js-std/multi-query.js')
-rw-r--r--src/test/rustdoc-js-std/multi-query.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/rustdoc-js-std/multi-query.js b/src/test/rustdoc-js-std/multi-query.js
index 01e54065189..1c92d019606 100644
--- a/src/test/rustdoc-js-std/multi-query.js
+++ b/src/test/rustdoc-js-std/multi-query.js
@@ -2,8 +2,9 @@ const QUERY = 'str,u8';
 
 const EXPECTED = {
     'others': [
-        { 'path': 'std', 'name': 'str' },
-        { 'path': 'std', 'name': 'u8' },
-        { 'path': 'std::ffi', 'name': 'CStr' },
+        { 'path': 'std', 'name': 'str', 'href': '../std/primitive.str.html' },
+        { 'path': 'std', 'name': 'u8', 'href': '../std/primitive.u8.html'  },
+        { 'path': 'std', 'name': 'str', 'href': '../std/str/index.html' },
+        { 'path': 'std', 'name': 'u8', 'href': '../std/u8/index.html' },
     ],
 };