Skip to content

Commit

Permalink
rustdoc: Remove crate name from primitives, make them turn up first i…
Browse files Browse the repository at this point in the history
…n search
  • Loading branch information
Manishearth committed Sep 27, 2015
1 parent e266651 commit 9256947
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 9256947

Please sign in to comment.