| Age | Commit message (Collapse) | Author | Lines |
|
r=GuillaumeGomez,notriddle
If a trait item appears in rustdoc search, hide the corrosponding impl items
fixes rust-lang/rust#138251
cc `@notriddle`
|
|
|
|
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>
|
|
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
|
|
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/
|
|
|
|
This avoids blocking on these lookups, so name-based searches
return results more quickly.
|
|
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.
|
|
|
|
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`
|
|
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).
|
|
|
|
|
|
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
|
|
|
|
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`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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```
|
|
run spellcheck as a tidy extra check in ci
This is probably how it should've been done from the start.
r? ``@Kobzol``
|
|
|
|
|
|
This reverts commit 1140e90074b0cbcfdea8535e4b51877e2838227e.
|
|
This reverts commit fdbc8d08a63a3d34b7aebabb2f18a768462a98c4.
|
|
crate"
This reverts commit cd79c7189db7b611f9199fd12ba56563afa18642.
|
|
|
|
Rank doc aliases lower than equivalently matched items
Follow-up of https://github.com/rust-lang/rust/pull/143988.
cc `@lolbinarycat`
|
|
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.
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
r=GuillaumeGomez
Rustdoc js: even more typechecking improvements
I noticed some oddities when I went to start working on type aliases, so I've gone and cleaned up a bunch of stuff. Notably `fullId` was nearly always an integer in practice, but tsc was being told it should be a string.
r? ``@notriddle``
|
|
non-exhaustive list of changes:
* rustdoc.Results has a max_dist field
* improve typechecking around pathDist and addIntoResults
* give handleNameSearch a type signature
* typecheck sortQ
* currentCrate is string and not optional
* searchState is referenced as a global, not through window
|
|
Fixes firefox copy paste issue
|
|
|
|
r=lolbinarycat
Fix random failure when JS code is executed when the whole file was not read yet
Very randomly (and rarely), when I arrived on a page with `?search=something` in the URL, I got this error:

Moving the `initSearch` function at the bottom to ensure everything has been loaded fixes the issue.
PS: Sorry for the noise. Pushed to the wrong branch and https://github.com/rust-lang/rust/pull/142496 closed. ><
|
|
Lint about `console` calls in rustdoc JS
As discussed [here](https://github.com/rust-lang/rust/pull/142100#discussion_r2151764395), this PR enforces that `console` is not used in rustdoc JS by default.
cc `@lolbinarycat`
|
|
|
|
this is one-time initialization data, it can just
be a function parameter.
we also move the json parsing into createSrcSidebar
to save a few bytes.
|