about summary refs log tree commit diff
path: root/src/librustdoc/html/static
AgeCommit message (Collapse)AuthorLines
2025-10-03Auto merge of #145898 - lolbinarycat:rustdoc-search-trait-parent, ↵bors-20/+123
r=GuillaumeGomez,notriddle If a trait item appears in rustdoc search, hide the corrosponding impl items fixes rust-lang/rust#138251 cc `@notriddle`
2025-10-02search.js: introduce optimized removeIdxListAsc routinebinarycat-9/+30
2025-10-02if a trait item is shown in search results, hide the impl itembinarycat-21/+103
for example, if we're showing `Iterator::next`, we don't need to also show `Range::next` in the results. Co-authored-by: Michael Howell <michael@notriddle.com>
2025-09-28Auto merge of #147002 - notriddle:stringdex3, r=GuillaumeGomezbors-27/+51
rustdoc-search: stringdex update with more packing Before: 18M build/x86_64-unknown-linux-gnu/doc/search.index/ 57M build/x86_64-unknown-linux-gnu/compiler-doc/search.index/ After: 16M build/x86_64-unknown-linux-gnu/doc/search.index/ 49M build/x86_64-unknown-linux-gnu/compiler-doc/search.index/ CC rust-lang/rust#146063
2025-09-24rustdoc-search: stringdex update with more packingMichael Howell-27/+51
Before: 18M build/x86_64-unknown-linux-gnu/doc/search.index/ 57M build/x86_64-unknown-linux-gnu/compiler-doc/search.index/ After: 16M build/x86_64-unknown-linux-gnu/doc/search.index/ 49M build/x86_64-unknown-linux-gnu/compiler-doc/search.index/
2025-09-23prevent line number from being copied in chromeIris Shi-7/+18
2025-09-12rustdoc-search: delay loading type name IDs until type searchMichael Howell-90/+233
This avoids blocking on these lookups, so name-based searches return results more quickly.
2025-09-12rustdoc-search: reduce async machinery in value lookupsMichael Howell-50/+57
This commit is a mirrored change from stringdex that makes `at()` not always return a promise, which is fine because we can still `await` it.
2025-09-11Correctly handle literal search on pathsGuillaume Gomez-2/+4
2025-09-04Auto merge of #145911 - notriddle:stringdex-tweak-3, r=GuillaumeGomezbors-161/+644
rustdoc-search: yet another stringdex optimization attempt This one's uses a different tactic. It shouldn't significantly increase the amount of downloaded index data, but still reduces the amount of disk usage. This one works by changing the suffix-only node representation to omit some data that's needed for checking. Since those nodes make up the bulk of the tree, it reduces the data they store, but also requires validating the match by fetching the name itself (but the names list is pretty small, and when I tried it with wordnet "indexing" it was about the same). r? `@GuillaumeGomez`
2025-09-03rustdoc-search: yet another stringdex optimization attemptMichael Howell-161/+644
This one's uses a different tactic. It shouldn't significantly increase the amount of downloaded index data, but still reduces the amount of disk usage. This one works by changing the suffix-only node representation to omit some data that's needed for checking. Since those nodes make up the bulk of the tree, it reduces the data they store, but also requires validating the match by fetching the name itself (but the names list is pretty small, and when I tried it with wordnet "indexing" it was about the same).
2025-08-31rustdoc-search: skip loading unneeded fnDataMichael Howell-12/+13
2025-08-30rustdoc-search: improve concurrency at type searchMichael Howell-9/+15
2025-08-30rustdoc-search: split function inverted index by input/outputMichael Howell-24/+44
With a patch applied to count the number of unifications, and running the query `Option<T>, (T -> U) -> Option<U>` before: performed unifyFunctionType on 17484 functions after: performed unifyFunctionType on 3055 functions
2025-08-28Add new `doc(attribute = "...")` attributeGuillaume Gomez-1/+14
2025-08-26Rollup merge of #145596 - lumiscosity:optimize-png-files, r=davidtwcoGuillaume Gomez-0/+0
Losslessly optimize PNG files Losslessly optimizes all of the PNG files in the repo. Done with: ``` oxipng -o max -a -s oxipng -o max --zopfli -a -s ```
2025-08-24Auto merge of #137229 - GuillaumeGomez:expand-macro, r=lolbinarycatbors-3/+48
Add support for macro expansion in rustdoc source code pages This is what it looks like: ![Screenshot From 2025-02-18 18-08-51](https://github.com/user-attachments/assets/ce2b3806-6218-47df-94bf-e9e9ed40cd41) ![image](https://github.com/user-attachments/assets/891042db-8632-4dba-9343-e28570c058fe) You can test it [here](https://rustdoc.crud.net/imperio/macro-expansion/src/lib/lib.rs.html). In this case, I also enabled the `--generate-link-to-definition` to show that both options work well together. Note: <del>There is a bug currently in firefox where the line numbers are not displayed correctly if they're inside the "macro expansion" span: https://bugzilla.mozilla.org/show_bug.cgi?id=1949948<del> Found a workaround around this bug. r? `@notriddle`
2025-08-22Rollup merge of #145742 - ↵Jacob Pratt-43/+18
lolbinarycat:rustdoc-search-type-cleanup-continued, r=GuillaumeGomez rustdoc js: Even more typechecking improvments made another pass at eliminating typescript errors, this time mainly focused on adding fields to `window` that weren't declared before. r? `@notriddle`
2025-08-23Make macro expansion feature buttons accessibleGuillaume Gomez-8/+6
2025-08-23Go around firefox bugGuillaume Gomez-1/+7
2025-08-23Correctly handle multiple macro expansions on a same lineGuillaume Gomez-4/+6
2025-08-23Add support for macro expansion in rustdoc source code pagesGuillaume Gomez-9/+48
2025-08-22main.js: only call window.rustdocToggleSrcSidebar if it existsbinarycat-2/+1
2025-08-22typecheck: add nonnull around element known to existbinarycat-2/+1
2025-08-22typecheck tooltipBlurHandlerbinarycat-1/+3
2025-08-22typecheck window.CURRENT_TOOLTIP_ELEMENTbinarycat-32/+7
2025-08-21typecheck window.NOTABLE_TRAITSbinarycat-2/+2
2025-08-21typecheck window.rr_binarycat-2/+2
2025-08-21typecheck window.searchIndexbinarycat-2/+2
2025-08-21add special formatting for displaying raw pointers in signaturesbinarycat-2/+22
2025-08-21rustdoc search: accept *mut T syntax for raw pointersbinarycat-30/+45
2025-08-21Losslessly optimize PNG fileslumiscosity-0/+0
Losslessly optimizes all of the PNG files in the repo. Done with: ``` oxipng -o max -a -s oxipng -o max --zopfli -a -s ```
2025-08-20Fix JS search scripts pathGuillaume Gomez-2/+2
2025-08-20Rollup merge of #140314 - lolbinarycat:rustdoc-js-scrape-examples-typecheck, ↵Jacob Pratt-11/+43
r=notriddle Rustdoc: typecheck scrape-examples.js more typechecking progress, this time we're mostly held back by the fact that `document.querySelectorAll` can't return nice types if its given a compound query (see the issue linked in a code comment). Additionally, it seems like the generated `data-locs` attribute has fields that are never used by anything? r? ```@notriddle```
2025-08-19Rollup merge of #145025 - lolbinarycat:ci-tidy-spellcheck, r=Kobzol许杰友 Jieyou Xu (Joe)-1/+1
run spellcheck as a tidy extra check in ci This is probably how it should've been done from the start. r? ``@Kobzol``
2025-08-16run spellcheck as a tidy extra check in cibinarycat-1/+1
2025-08-15rustdoc-search: search backend with partitioned suffix treeMichael Howell-3307/+6426
2025-08-14Revert "rustdoc search: prefer stable items in search results"Guillaume Gomez-24/+2
This reverts commit 1140e90074b0cbcfdea8535e4b51877e2838227e.
2025-08-14Revert "rustdoc search: add performance note about searchIndexUnstable check"Guillaume Gomez-6/+0
This reverts commit fdbc8d08a63a3d34b7aebabb2f18a768462a98c4.
2025-08-14Revert "Correctly handle when there are no unstable items in the documented ↵Guillaume Gomez-3/+1
crate" This reverts commit cd79c7189db7b611f9199fd12ba56563afa18642.
2025-08-13Correctly handle when there are no unstable items in the documented crateGuillaume Gomez-1/+3
2025-08-09Rollup merge of #145100 - GuillaumeGomez:rank-doc-alias-lower, r=lolbinarycatStuart Cook-0/+7
Rank doc aliases lower than equivalently matched items Follow-up of https://github.com/rust-lang/rust/pull/143988. cc `@lolbinarycat`
2025-08-09Rollup merge of #141658 - lolbinarycat:rustdoc-search-stability-rank-138067, ↵Stuart Cook-1/+29
r=GuillaumeGomez rustdoc search: prefer stable items in search results fixes https://github.com/rust-lang/rust/issues/138067 this does add a new field to the search index, but since we're only listing unstable items instead of adding a boolean flag to every item, it should only increase the search index size of sysroot crates, since those are the only ones using the `staged_api` feature, at least as far as the rust project is concerned.
2025-08-09Rank doc aliases lower than equivalently matched itemsGuillaume Gomez-0/+7
2025-08-08rustdoc search: add performance note about searchIndexUnstable checkbinarycat-0/+6
2025-08-04Fix wrong font being used for tooltips `i` iconsGuillaume Gomez-0/+4
2025-07-26Rollup merge of #141663 - lolbinarycat:rustdoc-collapse-impl-134429, ↵Trevor Gross-6/+22
r=GuillaumeGomez rustdoc: add ways of collapsing all impl blocks either shift+click the Summary button, or use the `_` key. this collapses everything, including (inherent) impl blocks. no need for a special "expand all impl blocks" method, as impl blocks are expanded during regular "expand all". doing "expand all" -> "collapse all" will always result in only impl blocks being expaned. not sure the best way to add a GUI test. fixes https://github.com/rust-lang/rust/issues/134429
2025-07-19Add code comment explaining better what `Row.name` is for doc aliasesGuillaume Gomez-0/+2
2025-07-16Make aliases search support partial matchingGuillaume Gomez-73/+82
2025-07-03Rollup merge of #134006 - klensy:typos, r=nnethercoteJana Dönszelmann-2/+2
setup typos check in CI This allows to check typos in CI, currently for compiler only (to reduce commit size with fixes). With current setup, exclude list is quite short, so it worth trying? Also includes commits with actual typo fixes. MCP: https://github.com/rust-lang/compiler-team/issues/817 typos check currently turned for: * ./compiler * ./library * ./src/bootstrap * ./src/librustdoc After merging, PRs which enables checks for other crates (tools) can be implemented too. Found typos will **not break** other jobs immediately: (tests, building compiler for perf run). Job will be marked as red on completion in ~ 20 secs, so you will not forget to fix it whenever you want, before merging pr. Check typos: `python x.py test tidy --extra-checks=spellcheck` Apply typo fixes: `python x.py test tidy --extra-checks=spellcheck:fix` (in case if there only 1 suggestion of each typo) Current fail in this pr is expected and shows how typo errors emitted. Commit with error will be removed after r+.