Commit graph

14 commits

Author SHA1 Message Date
Michael Howell
217fe24e52 rustdoc-search: null, not -1, for missing id
This allows us to use negative numbers for others purposes.
2023-09-03 11:20:22 -07:00
Michael Howell
9946d67579 rustdoc-search: build args, return, and generics on one unifier
This enhances generics with the "unboxing" behavior where A<T>
matches T. It makes this unboxing transitive over generics.
2023-06-11 18:19:37 -07:00
Michael Howell
4c11822aeb rustdoc: restructure type search engine to pick-and-use IDs
This change makes it so, instead of mixing string distance with
type unification, function signature search works by
mapping names to IDs at the start, reporting to the user any
cases where it had to make corrections, and then matches with
IDs when going through the items.

This only changes function searches. Name searches are left alone,
and corrections are only done when there's a single item in the
search query.
2023-04-17 12:16:54 -07:00
Michael Howell
53f499d475 rustdoc-search: use ES6 Map for Result instead of Object 2023-04-13 17:40:06 -07:00
Michael Howell
33cf9ea4a2 Add comments, fixes for 0 sentinel 2022-06-27 14:15:14 -07:00
Michael Howell
b54e3e6c98
Update src/librustdoc/html/static/js/externs.js
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2022-06-27 12:07:13 -07:00
Michael Howell
8081096a7f Add documentation 2022-06-27 11:07:16 -07:00
Folyd
a8ede1248d Change eslint rules from configuration comments to configuration files 2022-05-07 11:47:30 +08:00
Guillaume Gomez
cb8da88c83 Migrate externs.js to ES6 2022-04-26 20:59:32 +02:00
Guillaume Gomez
699ae365df Apply suggestions:
* Forbid generics without a path (so "<p>" is forbidden).
 * Change `handleSingleArg` so that it takes `results_others`, `results_in_args` and `results_returned` as arguments instead of using the "global" variables.
 * Change `createQueryElement` so that it returns the newly created element instead of taking `elems` as argument.
 * Improve documentation
2022-04-18 20:59:09 +02:00
Guillaume Gomez
264064df36 * Greatly improve the rustdoc search parser source code
* Move all functions outside parseQuery
2022-04-18 20:59:08 +02:00
Guillaume Gomez
bbcf1762dd Improve naming of "val" field 2022-04-18 20:59:08 +02:00
Guillaume Gomez
be41750a10 Greatly improve rustdoc search 2022-04-18 20:59:08 +02:00
Jacob Hoffman-Andrews
7ba086c6db Add some JSDoc comments to rustdoc JS
This follows the Closure Compiler dialect of JSDoc, so we
can use it to do some basic type checking. We don't plan to
compile with Closure Compiler, just use it to check types. See
https://github.com/google/closure-compiler/wiki/ for details.
2021-12-22 14:20:04 -08:00