From 28f17d97a9e7276a383e11e91ef2d4159e670726 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Mon, 20 Nov 2023 13:37:57 -0700 Subject: 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. --- tests/rustdoc-js-std/parser-returned.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/rustdoc-js-std/parser-returned.js') diff --git a/tests/rustdoc-js-std/parser-returned.js b/tests/rustdoc-js-std/parser-returned.js index 6ea86609115..44e517c49b5 100644 --- a/tests/rustdoc-js-std/parser-returned.js +++ b/tests/rustdoc-js-std/parser-returned.js @@ -89,7 +89,7 @@ const PARSED = [ pathWithoutLast: [], pathLast: "never", generics: [], - typeFilter: 15, + typeFilter: 1, }], userQuery: "-> !", error: null, -- cgit 1.4.1-3-g733a5