Skip to content

Commit 9d84c1f

Browse files
Rank doc aliases lower than equivalently matched items
1 parent 9b1a30e commit 9d84c1f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/librustdoc/html/static/js/search.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3374,6 +3374,13 @@ class DocSearch {
33743374
return (aw > bw ? +1 : -1);
33753375
}
33763376

3377+
// sort doc alias items later
3378+
a = Number(aaa.item.is_alias);
3379+
b = Number(bbb.item.is_alias);
3380+
if (a !== b) {
3381+
return a - b;
3382+
}
3383+
33773384
// que sera, sera
33783385
return 0;
33793386
});

0 commit comments

Comments
 (0)