diff options
| author | Michael Howell <michael@notriddle.com> | 2023-11-20 13:37:57 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2023-11-21 13:59:26 -0700 |
| commit | 28f17d97a9e7276a383e11e91ef2d4159e670726 (patch) | |
| tree | e737352eb38f963c24ffbc5b5e12f718a0ffd4bd /tests/rustdoc-js-std/keyword.js | |
| parent | d82a08537aab25f3d1d43a30ea4b06422819bbfd (diff) | |
| download | rust-28f17d97a9e7276a383e11e91ef2d4159e670726.tar.gz rust-28f17d97a9e7276a383e11e91ef2d4159e670726.zip | |
rustdoc-search: make primitives and keywords less special
The search sorting code already sorts by item type discriminant, putting things with smaller discriminants first. There was also a special case for sorting keywords and primitives earlier, and this commit removes it by giving them lower discriminants. The sorting code has another criteria where items with descriptions appear earlier than items without, and that criteria has higher priority than the item type. This shouldn't matter, though, because primitives and keywords normally only appear in the standard library, and it always gives them descriptions.
Diffstat (limited to 'tests/rustdoc-js-std/keyword.js')
| -rw-r--r-- | tests/rustdoc-js-std/keyword.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/rustdoc-js-std/keyword.js b/tests/rustdoc-js-std/keyword.js index b85ba34138b..1837b1e71f7 100644 --- a/tests/rustdoc-js-std/keyword.js +++ b/tests/rustdoc-js-std/keyword.js @@ -3,7 +3,7 @@ const EXPECTED = { 'query': 'fn', 'others': [ - { 'path': 'std', 'name': 'fn', ty: 15 }, // 15 is for primitive types - { 'path': 'std', 'name': 'fn', ty: 21 }, // 21 is for keywords + { 'path': 'std', 'name': 'fn', ty: 1 }, // 1 is for primitive types + { 'path': 'std', 'name': 'fn', ty: 0 }, // 0 is for keywords ], }; |
