-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type-based search does not work for primitives since March #74780
Comments
Relevant PR: #69402 |
The function is missing from the search index after that PR. Before: var N=null,E="",T="t",U="u",searchIndex={};
searchIndex["search_function_type"]={"doc":E,"i":[[5,"f","search_function_type","f",N,[[["usize"]],["usize"]]],[0,"m",E,E,N,N]],"p":[]};
initSearch(searchIndex);addSearchOptions(searchIndex); After: searchIndex["search_function_type"] = {"doc":"","i":[[5,"f","search_function_type","f",null,[[]]],[0,"m","","",null,null]],"p":[]};
addSearchOptions(searchIndex);initSearch(searchIndex); |
Actually it looks like the function is still there, it's just missing the types for the arguments and return type. |
Maybe this bit of code is skipping it when it wasn't before? https://github.com/rust-lang/rust/pull/69402/files?file-filters%5B%5D=.rs#diff-2b73a40b29f966df2a77a3bbaf34a9f1L234-R246 |
Yeah, I don't think arguments have def ids. |
To be exact, the problem seems to come from: Primitive(p) => crate::html::render::cache().primitive_locations.get(&p).cloned(), coming from:
in the |
Through some chats in discord it seems like a good approach to this would be to:
Eventually I'd like to stop having the cache be a global parameter and instead passing it around as much as possible so that such problems are easier to avoid. |
Labeling as |
…ollie27 Fix primitive search in parameters and returned values Part of rust-lang#60485. Fixes rust-lang#74780. Replacing rust-lang#74879. cc `@camelid` `@jyn514` `@CraftSpider` r? `@ollie27`
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:
search_works.sh:
search_function_type.rs:
search-function-type.js:
This requires a git clone of rustc as well as the following modification to
tester.js
:Originally reported in #60485 (comment).
The text was updated successfully, but these errors were encountered: