diff options
| author | bors <bors@rust-lang.org> | 2021-04-17 20:41:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-04-17 20:41:37 +0000 |
| commit | 392ba2ba1a7d6c542d2459fb8133bebf62a4a423 (patch) | |
| tree | 4b21d63dfc13864287cf392c901a998ecb33a386 /src/tools/rustdoc-js/tester.js | |
| parent | bd9949b8e6577631f8e2757a4a007098e6a88b7d (diff) | |
| parent | a3277e2a0a2ccd165f5ea7dd485828051d31e030 (diff) | |
| download | rust-392ba2ba1a7d6c542d2459fb8133bebf62a4a423.tar.gz rust-392ba2ba1a7d6c542d2459fb8133bebf62a4a423.zip | |
Auto merge of #84279 - Dylan-DPC:rollup-k7otd7e, r=Dylan-DPC
Rollup of 4 pull requests Successful merges: - #83237 (rustdoc: use more precise relative URLs) - #84150 (rustdoc: move some search code into search.js) - #84203 (rustdoc: Give a more accurate span for anchor failures) - #84257 (Add documentation to help people find `Ipv4Addr::UNSPECIFIED`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/tools/rustdoc-js/tester.js')
| -rw-r--r-- | src/tools/rustdoc-js/tester.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/rustdoc-js/tester.js b/src/tools/rustdoc-js/tester.js index a551a97bda5..e583bd225a9 100644 --- a/src/tools/rustdoc-js/tester.js +++ b/src/tools/rustdoc-js/tester.js @@ -246,7 +246,7 @@ function lookForEntry(entry, data) { return null; } -function loadMainJsAndIndex(mainJs, searchIndex, storageJs, crate) { +function loadSearchJsAndIndex(searchJs, searchIndex, storageJs, crate) { if (searchIndex[searchIndex.length - 1].length === 0) { searchIndex.pop(); } @@ -270,9 +270,9 @@ function loadMainJsAndIndex(mainJs, searchIndex, storageJs, crate) { ALIASES = {}; finalJS += 'window = { "currentCrate": "' + crate + '", rootPath: "../" };\n'; finalJS += loadThings(["hasOwnProperty", "onEach"], 'function', extractFunction, storageJs); - finalJS += loadThings(arraysToLoad, 'array', extractArrayVariable, mainJs); - finalJS += loadThings(variablesToLoad, 'variable', extractVariable, mainJs); - finalJS += loadThings(functionsToLoad, 'function', extractFunction, mainJs); + finalJS += loadThings(arraysToLoad, 'array', extractArrayVariable, searchJs); + finalJS += loadThings(variablesToLoad, 'variable', extractVariable, searchJs); + finalJS += loadThings(functionsToLoad, 'function', extractFunction, searchJs); var loaded = loadContent(finalJS); var index = loaded.buildIndex(searchIndex.rawSearchIndex); @@ -382,12 +382,12 @@ function runChecks(testFile, loaded, index) { } function load_files(doc_folder, resource_suffix, crate) { - var mainJs = readFile(path.join(doc_folder, "main" + resource_suffix + ".js")); + var searchJs = readFile(path.join(doc_folder, "search" + resource_suffix + ".js")); var storageJs = readFile(path.join(doc_folder, "storage" + resource_suffix + ".js")); var searchIndex = readFile( path.join(doc_folder, "search-index" + resource_suffix + ".js")).split("\n"); - return loadMainJsAndIndex(mainJs, searchIndex, storageJs, crate); + return loadSearchJsAndIndex(searchJs, searchIndex, storageJs, crate); } function showHelp() { |
