Closed
Description
searched nightlies: from nightly-2019-05-02 to nightly-2020-07-17
regressed nightly: nightly-2020-03-20
searched commits: from f509b26 to f4c675c
regressed commit: f4c675c
bisected with cargo-bisect-rustc v0.5.2
Host triple: x86_64-unknown-linux-gnu
Reproduce with:
cargo bisect-rustc --script ./search_works.sh --start 2019-05-02 --preserve
search_works.sh:
#!/bin/sh
set -eu
rustdoc search_function_type.rs
node ~/rustc/src/tools/rustdoc-js/tester.js --doc-folder doc --crate-name search_function_type --test-file ~/rustc/src/test/rustdoc-js/tmp/search-function-type.js
search_function_type.rs:
/// f
pub fn f(u: usize) -> usize {
u
}
search-function-type.js:
const QUERY = 'usize -> usize';
const EXPECTED = {
'in_args': [
{ 'path': 'search_function_type', 'name': 'f' },
],
};
This requires a git clone of rustc as well as the following modification to tester.js
:
diff --git a/src/tools/rustdoc-js/tester.js b/src/tools/rustdoc-js/tester.js
index 139e6f73f42..8a3ab056f80 100644
--- a/src/tools/rustdoc-js/tester.js
+++ b/src/tools/rustdoc-js/tester.js
@@ -182,7 +182,7 @@ function loadThings(thingsToLoad, kindOfLoad, funcToCall, fileContent) {
var tmp = funcToCall(fileContent, thingsToLoad[i]);
if (tmp === null) {
console.log('unable to find ' + kindOfLoad + ' "' + thingsToLoad[i] + '"');
- process.exit(1);
+ continue;
}
content += tmp;
content += 'exports.' + thingsToLoad[i] + ' = ' + thingsToLoad[i] + ';';
Originally reported in #60485 (comment).