| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
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
|
|
Fix variable name
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
|
|
|
|
|
|
|
|
|
|
Struct variant field search
Fixes #16017.
Reopening of #64724.
cc @tomjakubowski
cc @ollie27
r? @kinnison
|
|
*Total -- 10.65kb -> 8.44kb (20.82%)
/src/etc/installer/gfx/rust-logo.png -- 5.71kb -> 3.82kb (33.11%)
/src/librustdoc/html/static/down-arrow.svg -- 0.63kb -> 0.50kb (20.44%)
/src/librustdoc/html/static/wheel.svg -- 3.86kb -> 3.68kb (4.66%)
/src/librustdoc/html/static/brush.svg -- 0.47kb -> 0.44kb (4.61%)
Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
|
|
On the backend, rustdoc now emits `paths` entries to a crate's search
index for struct-like enum variants, and index items of type structfield
which belong to such variants point to their variant parents in the
`paths` table, rather than their enum grandparents. The path entry for
a variant is the fully qualified module path plus the enum name.
On the frontend, the search code recognizes structfields belonging to
structlike variants in the `paths` table and re-constructs the URL to
the field's anchor on the enum documentation page.
closes #16017
|
|
r=ollie27
Fix null synthetic_implementors error
Fixes #68584.
r? @ollie27
cc @kinnison
|
|
|
|
|
|
|
|
rustdoc: HTML escape arrows on help popup
r? @GuillaumeGomez
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Preserve whitespace inside one-backtick codeblocks
Previously this was only done inside short docblocks (e.g., summary
lines), but we should also do so in general.
Fixes #65555
|
|
This reverts commit ea9519bf16f0be137a814a49c9fbaf232ba49a43.
|
|
Fix selected crate search filter
Fixes #62929.
r? @kinnison
|
|
rustdoc: fixes #64305: disable search field instead of hidding it
The result seems to be ok but I wasn't entirely sure how to get there. I tried to stay generic a bit but maybe it's not required at all.
@GuillaumeGomez
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
|
|
r=GuillaumeGomez
Update Source Code Pro and include italics
Fixes #65502.
A few notes:
* As stated in #65502, this does increase the download size.
* Since this PR changes the font set, I think docs.rs would have to be updated if this PR is merged.
* The fonts have a double extension (.ttf.woff); this is to keep the names consistent with the upstream font release which does that to distinguish these from the .otf.woff files ([Source Code Pro otf renders poorly on older Windows system apps](https://github.com/adobe-fonts/source-code-pro/issues/25#issuecomment-9019600)).
|
|
|
|
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
|
|
r=GuillaumeGomez
[doc] Fix the source code highlighting on source comments
The code would always forget the previous selection.
r? @GuillaumeGomez
|
|
|
|
|
|
|
|
Also move the declaration outside the loop since they accumulate state with each iteration
|
|
|
|
No more hidden elements
Fixes #66046.
Follow-up of #66082.
r? @kinnison
|
|
[rustdoc] add sub settings
This PR is to give a finer control over what types are automatically expanded or not as well as the possibility to add sub-settings in the settings page.

r? @Mark-Simulacrum
|
|
|
|
|
|
|
|
|
|
|
|
r=Mark-Simulacrum
Move help popup generation code
The first commit is just a small cleanup.
The idea behind this PR is to reduce a bit more the generated HTML files by moving the duplicated code into one place instead.
r? @kinnison
|
|
Prevent help popup to disappear when clicking on it
Fixes #65736.
r? @kinnison
|
|
|
|
|
|
|