| Age | Commit message (Collapse) | Author | Lines |
|
|
|
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
|
|
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. ><
|
|
|
|
`search.js`
|
|
|
|
specifically, `storage.js` is not loaded during `rustdoc-js`
and `rustdoc-js-std` tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
only errors that are string arrays are intended to be shown
to the user, other errors are bugs,
and will be shown in the console as usual.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
some of the fields of rustdoc.Row were confusing null and undefined.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ideally we would encode that it is a string before
convertTypeFilterOnElem is called, and a number after,
but i'm not sure that's possible without significant refactoring.
|
|
we encode "if the argument is a non-empty string,
this will never return null" into the type signature.
|
|
|
|
|
|
rustdoc: clean up a bunch of ts-expected-error declarations in main
This mostly consists of handling potentially-null input and adding more global functions to the list of globals.
Follow-up for #136161
|
|
This mostly consists of handling potentially-null input and adding
more global functions to the list of globals.
|
|
|
|
By nobuild, I mean that the type annotations are all in comments,
not in the "native" typescript syntax. This is a bit uglier,
but it lets you rapid-prototype without tsc, works with all
the native browser debugging tools, and keeps Node out of Rust's
bootstrap chain.
This pull request mostly just adds ts-ignore annotations
and type declarations. To actually take good advantage of
typescript, we'll want to "burn down" this pile of unsafe code
until we eventually have a version with almost none of these.
This PR also adds tsc to the mingw-check Dockerfile, so that
it can't fall out of date like the Closure annotations did.
https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/typescript
|
|
constants and statics are nullary functions, and struct fields are unary functions.
functions (along with methods and trait methods) are prioritized over other
items, like fields and constants.
|
|
A clone-like function in a function that takes as an argument the type
that it returns.
However, functions that return a type variable are not counted as
clone-line. Because we're not unifying the whole function at once,
a function like `U -> T` would otherwise be counted as "clone-like"
because the generics will just unify with anything when done seperatly.
Co-authored-by: Michael Howell <michael@notriddle.com>
|
|
Signed-off-by: ericlehong <193237094+ericlehong@users.noreply.github.com>
|
|
While normal generics can be skipped in this case, no-names need
something to show here.
Before: `TyCtxt, , Symbol -> bool`
After: `TyCtxt, Into<DefId>, Symbol -> bool`
|
|
|
|
Addresses a comment from [jsha's benchmarking], where the `contains`
function showed up in the profiler. This commit pulls it from about
5% of the runtime to about 0.5%.
[jsha's benchmarking]: https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/search.20profiling/near/481868761
|
|
fixes https://github.com/rust-lang/rust/issues/129707
this can be used to show all items in a module,
or all associated items for a type.
currently sufferes slightly due to case insensitivity,
so `Option::` will also show items in the `option::` module.
it disables the checking of the last path element,
otherwise only items with short names will be shown
|
|
Rollup of 4 pull requests
Successful merges:
- #128197 (Skip locking span interner for some syntax context checks)
- #133040 ([rustdoc] Fix handling of footnote reference in footnote definition)
- #133043 (rustdoc-search: case-sensitive only when capitals are used)
- #133046 (Clippy subtree update)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
This is the "smartcase" behavior, described by vim and dtolnay.
|
|
|