Skip to content

Commit

Permalink
Rollup merge of rust-lang#28688 - Manishearth:fix-primitives-search, …
Browse files Browse the repository at this point in the history
…r=eddyb

None
  • Loading branch information
Manishearth committed Sep 27, 2015
2 parents 30b43c1 + 9256947 commit c34f3ea
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@
if ((aaa.item.ty === TY_PRIMITIVE) && (bbb.item.ty !== TY_PRIMITIVE)) {
return -1;
}
if ((bbb.item.ty === TY_PRIMITIVE) && (aaa.item.ty !== TY_PRIMITIVE)) {
return 1;
}

// sort by description (no description goes later)
a = (aaa.item.desc === '');
Expand Down Expand Up @@ -572,6 +575,10 @@
displayPath = item.path + '::';
href = rootPath + item.path.replace(/::/g, '/') +
'/index.html';
} else if (type === "primitive") {
displayPath = "";
href = rootPath + item.path.replace(/::/g, '/') +
'/' + type + '.' + name + '.html';
} else if (item.parent !== undefined) {
var myparent = item.parent;
var anchor = '#' + type + '.' + name;
Expand Down

0 comments on commit c34f3ea

Please sign in to comment.