Skip to content

Commit

Permalink
rustdoc: Don't include the path for primitive methods in the search r…
Browse files Browse the repository at this point in the history
…esults

Displaying `std::u32::max_value` is misleading so just display
`u32::max_value`.
  • Loading branch information
ollie27 committed Aug 13, 2016
1 parent 5940150 commit 616b101
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,9 +587,14 @@
} else if (item.parent !== undefined) {
var myparent = item.parent;
var anchor = '#' + type + '.' + name;
displayPath = item.path + '::' + myparent.name + '::';
var parentType = itemTypes[myparent.ty];
if (parentType === "primitive") {
displayPath = myparent.name + '::';
} else {
displayPath = item.path + '::' + myparent.name + '::';
}
href = rootPath + item.path.replace(/::/g, '/') +
'/' + itemTypes[myparent.ty] +
'/' + parentType +
'.' + myparent.name +
'.html' + anchor;
} else {
Expand Down

0 comments on commit 616b101

Please sign in to comment.