rust/src/librustdoc/html
bors f4c675c476 Auto merge of #69402 - GuillaumeGomez:extend-search, r=kinnison
Extend search

I realized that when looking for "struct:String" in the rustdoc search for example, the "in arguments" and "returned" tabs were always empty. After some investigation, I realized it was because we only provided the name, and not the type, making it impossible to pass the "type filtering" check.

To resolve this, I added the type alongside the name. Note for the future: we could improve this by instead only registering the path id and use the path dictionary directly. The only problem with that solution (which I already tested) is that it becomes complicated for types in other crates. It'd force us to handle both case with an id and a case with `(name, type)`. I found the current PR big enough to not want to provide it directly. However, I think this is definitely worth it to make it work this way in the future.

About the two tests I added: they don't have much interest except checking that we actually have something returned in the search in the cases of a type filtering with and without literal search.

I also had to update a bit the test script to add the new locally global (haha) variable I created (`NO_TYPE_FILTER`). I added this variable to make the code easier to read than just "-1".

r? @kinnison

cc @ollie27
2020-03-19 16:07:59 +00:00
..
markdown Normalize syntax::edition imports. 2020-01-02 19:31:38 +01:00
render Rename render::Type to improve naming 2020-03-16 18:30:26 +01:00
static Auto merge of #69402 - GuillaumeGomez:extend-search, r=kinnison 2020-03-19 16:07:59 +00:00
toc Format the world 2019-12-22 17:42:47 -05:00
escape.rs Format the world 2019-12-22 17:42:47 -05:00
format.rs Remove "important traits" feature 2020-02-27 14:51:22 +01:00
highlight.rs fix various typos 2020-03-06 15:19:31 +01:00
item_type.rs Const items have by default a static lifetime, there's no need to annotate it. (clippy::redundant_static_lifetimes) 2020-03-05 16:38:24 +01:00
layout.rs Format the world 2019-12-22 17:42:47 -05:00
markdown.rs Use ?-operator in more places (clippy::question_mark, had some false negatives fixed recently) 2020-03-07 21:46:47 +01:00
render.rs Auto merge of #69402 - GuillaumeGomez:extend-search, r=kinnison 2020-03-19 16:07:59 +00:00
sources.rs Store TokenStream in rmeta::MacroDef. 2020-03-10 07:26:27 +01:00
static_files.rs rustdoc: remove redundant static lifetimes (clippy::redundant_static_lifetimes) 2020-03-07 21:48:17 +01:00
toc.rs Format the world 2019-12-22 17:42:47 -05:00