about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/parser-bindings.js
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-11-20 13:37:57 -0700
committerMichael Howell <michael@notriddle.com>2023-11-21 13:59:26 -0700
commit28f17d97a9e7276a383e11e91ef2d4159e670726 (patch)
treee737352eb38f963c24ffbc5b5e12f718a0ffd4bd /tests/rustdoc-js-std/parser-bindings.js
parentd82a08537aab25f3d1d43a30ea4b06422819bbfd (diff)
downloadrust-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-bindings.js')
-rw-r--r--tests/rustdoc-js-std/parser-bindings.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/rustdoc-js-std/parser-bindings.js b/tests/rustdoc-js-std/parser-bindings.js
index faf880c8116..c4909c6242d 100644
--- a/tests/rustdoc-js-std/parser-bindings.js
+++ b/tests/rustdoc-js-std/parser-bindings.js
@@ -81,7 +81,7 @@ const PARSED = [
                             pathWithoutLast: [],
                             pathLast: "never",
                             generics: [],
-                            typeFilter: 15,
+                            typeFilter: 1,
                         }]
                     ],
                 ],
@@ -112,7 +112,7 @@ const PARSED = [
                             pathWithoutLast: [],
                             pathLast: "[]",
                             generics: [],
-                            typeFilter: 15,
+                            typeFilter: 1,
                         }]
                     ],
                 ],
@@ -149,10 +149,10 @@ const PARSED = [
                                     pathWithoutLast: [],
                                     pathLast: "never",
                                     generics: [],
-                                    typeFilter: 15,
+                                    typeFilter: 1,
                                 },
                             ],
-                            typeFilter: 15,
+                            typeFilter: 1,
                         }]
                     ],
                 ],