Commit graph

38 commits

Author SHA1 Message Date
Yuki Okushi
ed9faeedda
Rollup merge of #96887 - notriddle:notriddle/as-raw-fd, r=jsha
rustdoc: correct path to type alias methods

Fixes #83991
2022-05-11 13:16:31 +09:00
Michael Howell
9dc5ac8c4b
Ignore order
This isn't an ordering test really, anyway...
2022-05-10 16:42:48 -07:00
Michael Howell
bb4ecc3fd8 rustdoc: correct path to type alias methods 2022-05-09 17:50:39 -07:00
Michael Howell
a9a90d450d Add test case for hashset::insert ranking 2022-05-09 12:24:09 -07:00
Guillaume Gomez
4ea149905b Update rustdoc search test to check ! 2022-04-26 20:57:46 +02:00
Guillaume Gomez
8d0e10cfbe Correctly handle single : 2022-04-18 23:11:42 +02:00
Guillaume Gomez
5c6c1e110f Add test to ensure that keywords in path are working 2022-04-18 21:43:19 +02:00
Guillaume Gomez
299e8ee25e Add an extra check over filter type 2022-04-18 21:43:19 +02:00
Guillaume Gomez
d7d538a8c4 Fix some corner cases 2022-04-18 20:59:09 +02:00
Guillaume Gomez
da363b2fc9 Add more tests for quote errors 2022-04-18 20:59:09 +02:00
Guillaume Gomez
ab9cf32131 Add tests for paths 2022-04-18 20:59:09 +02:00
Guillaume Gomez
e03a950747 Handle separators in their own functions and fix missing handling of tabs 2022-04-18 20:59:09 +02:00
Guillaume Gomez
da829d8d9d Improve the BNF description a bit and fix some issues 2022-04-18 20:59:09 +02:00
Guillaume Gomez
1f5c4c2b30 Forbid rustdoc search query to end with -> 2022-04-18 20:59:09 +02:00
Guillaume Gomez
8e29ed43d9 Add isIdentCharacter function to ensure that unexpected characters are handled correctly 2022-04-18 20:59:09 +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
c7de1a16f8 Improve documentation and add some explanations in the code 2022-04-18 20:59:09 +02:00
Guillaume Gomez
49297337b4 Simplify parser syntax 2022-04-18 20:59:08 +02:00
Guillaume Gomez
99d552092c Make query parser more strict and improve display of errors 2022-04-18 20:59:08 +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
51de26cfd9 * If type filter is in quotes, throw an error.
* If there are generics, don't allow to have quotes.
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
f5833e759e Add parser tests 2022-04-18 20:59:08 +02:00
Guillaume Gomez
0f51652ad3 Update tests 2022-04-18 20:59:08 +02:00
Daniel Henry-Mantilla
5360469b8d Update macro:print typed-query rustdoc test to include pin! results 2022-02-14 16:56:37 +01:00
Guillaume Gomez
8e12b4e94f Remove support for multi-query search 2022-02-10 13:17:38 +01:00
Joshua Nelson
7b46920218 Fix linkcheck issues
Most of these are because alloc uses `#[lang_item]` to define methods,
but core documents primitives before those methods are available.

- Fix rustdoc-js-std test

  For some reason this change made CStr not show up in the results for
  `str,u8`. Since it still shows up for str, and since it wasn't a great
  match for that query anyway, I think this is ok to let slide.

- Add test that all primitives can be linked to
- Enable `doc(primitive)` in `core` as well
- Add linkcheck exception specifically for Windows

  Ideally this would be done automatically by the linkchecker by
  replacing `\\` with forward slashes, but this PR is already a ton of
  work ...

- Don't forcibly fail linkchecking if there's a broken intra-doc link on Windows

  Previously, it would exit with a hard error if a missing file had `::`
  in it. This changes it to report a missing file instead, which allows
  adding an exception.
2021-09-12 02:30:24 +00:00
Michael Howell
cedd2425b6 fix(rustdoc): generics search
This commit adds a test case for generics, re-adds generics data
to the search index, and tweaks function indexing to use less space in JSON.

This reverts commit 14ca89446c.
2021-07-01 06:40:27 -07:00
Guillaume Gomez
855923c895 Add test to ensure that the typed queries are not including other types 2021-06-30 14:20:17 +02:00
Guillaume Gomez
5f22b30ca6 Add search index test for primitive types 2021-01-27 10:05:06 +01:00
Guillaume Gomez
c4d9318be6 Make current crate aliases go first 2020-05-14 11:36:02 +02:00
Guillaume Gomez
f581cf7544 Merge aliases and search-index 2020-05-07 20:08:08 +02:00
Guillaume Gomez
9697c467ac Update std tests 2020-05-07 20:08:08 +02:00
Guillaume Gomez
e78c451733 Add tests for new of variables 2020-03-16 18:30:26 +01:00
Guillaume Gomez
2f44857735 Update JS results tester 2020-03-16 18:29:19 +01:00
Guillaume Gomez
b9167e6c7d Support type search for arguments and returned types 2020-03-16 18:29:19 +01:00
Shiqing
cb84aa4744 Improve searching in rustdoc and add tests 2019-09-04 21:27:13 +08:00
Guillaume Gomez
aa3ca321e9 Rename rustdoc js test suites 2019-02-25 17:46:06 +01:00