We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a713867 commit 94b6ddcCopy full SHA for 94b6ddc
src/librustdoc/html/static/main.js
@@ -36,6 +36,9 @@
36
"constant",
37
"associatedconstant"];
38
39
+ // used for special search precedence
40
+ var TY_PRIMITIVE = itemTypes.indexOf("primitive");
41
+
42
$('.js-only').removeClass('js-only');
43
44
function getQueryStringParams() {
@@ -322,6 +325,10 @@
322
325
b = bbb.index;
323
326
if (a !== b) { return a - b; }
324
327
328
+ // special precedence for primitive pages
329
+ if ((aaa.item.ty === TY_PRIMITIVE) && (bbb.item.ty !== TY_PRIMITIVE)) {
330
+ return -1;
331
+ }
332
333
// sort by description (no description goes later)
334
a = (aaa.item.desc === '');
0 commit comments