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/parser-slice-array.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/parser-slice-array.js')
| -rw-r--r-- | tests/rustdoc-js-std/parser-slice-array.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/rustdoc-js-std/parser-slice-array.js b/tests/rustdoc-js-std/parser-slice-array.js index c22b7870dbf..239391bed42 100644 --- a/tests/rustdoc-js-std/parser-slice-array.js +++ b/tests/rustdoc-js-std/parser-slice-array.js @@ -43,16 +43,16 @@ const PARSED = [ pathWithoutLast: [], pathLast: "[]", generics: [], - typeFilter: 15, + typeFilter: 1, }, ], - typeFilter: 15, + typeFilter: 1, }, ], - typeFilter: 15, + typeFilter: 1, }, ], - typeFilter: 15, + typeFilter: 1, }, ], foundElems: 1, @@ -70,7 +70,7 @@ const PARSED = [ pathWithoutLast: [], pathLast: "[]", generics: [], - typeFilter: 15, + typeFilter: 1, }, { name: "u8", @@ -105,7 +105,7 @@ const PARSED = [ typeFilter: -1, }, ], - typeFilter: 15, + typeFilter: 1, }, ], foundElems: 1, @@ -140,7 +140,7 @@ const PARSED = [ typeFilter: -1, }, ], - typeFilter: 15, + typeFilter: 1, }, ], foundElems: 1, @@ -176,7 +176,7 @@ const PARSED = [ typeFilter: -1, }, ], - typeFilter: 15, + typeFilter: 1, }, ], foundElems: 1, @@ -194,7 +194,7 @@ const PARSED = [ pathWithoutLast: [], pathLast: "[]", generics: [], - typeFilter: 15, + typeFilter: 1, }, ], foundElems: 1, @@ -284,7 +284,7 @@ const PARSED = [ typeFilter: -1, }, ], - typeFilter: 15, + typeFilter: 1, }, ], foundElems: 1, |
