Skip to content

Commit c34f3ea

Browse files
committed
Rollup merge of #28688 - Manishearth:fix-primitives-search, r=eddyb
None
2 parents 30b43c1 + 9256947 commit c34f3ea

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/librustdoc/html/static/main.js

+7
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,9 @@
386386
if ((aaa.item.ty === TY_PRIMITIVE) && (bbb.item.ty !== TY_PRIMITIVE)) {
387387
return -1;
388388
}
389+
if ((bbb.item.ty === TY_PRIMITIVE) && (aaa.item.ty !== TY_PRIMITIVE)) {
390+
return 1;
391+
}
389392

390393
// sort by description (no description goes later)
391394
a = (aaa.item.desc === '');
@@ -572,6 +575,10 @@
572575
displayPath = item.path + '::';
573576
href = rootPath + item.path.replace(/::/g, '/') +
574577
'/index.html';
578+
} else if (type === "primitive") {
579+
displayPath = "";
580+
href = rootPath + item.path.replace(/::/g, '/') +
581+
'/' + type + '.' + name + '.html';
575582
} else if (item.parent !== undefined) {
576583
var myparent = item.parent;
577584
var anchor = '#' + type + '.' + name;

0 commit comments

Comments
 (0)