diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index bd03ab85c2c..593c7cba3a7 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -796,16 +796,6 @@ a { display: inline-block; } -.result-name span.primitive::after { - content: ' (primitive type)'; - font-style: italic; -} - -.result-name span.keyword::after { - content: ' (keyword)'; - font-style: italic; -} - body.blur > :not(#help) { filter: blur(8px); -webkit-filter: blur(8px); diff --git a/src/librustdoc/html/static/search.js b/src/librustdoc/html/static/search.js index 634e5fa5787..26b14f675f6 100644 --- a/src/librustdoc/html/static/search.js +++ b/src/librustdoc/html/static/search.js @@ -975,26 +975,32 @@ window.initSearch = function(rawSearchIndex) { output = "
"; array.forEach(function(item) { - var name, type; - - name = item.name; - type = itemTypes[item.ty]; - if (item.is_alias !== true) { if (duplicates[item.fullPath]) { return; } duplicates[item.fullPath] = true; } + + var name = item.name; + var type = itemTypes[item.ty]; + length += 1; + var extra = ""; + if (type === "primitive") { + extra = " (primitive type)"; + } else if (type === "keyword") { + extra = " (keyword)"; + } + output += "" + "
" + (item.is_alias === true ? ("" + item.alias + "  - see ") : "") + item.displayPath + "" + - name + "
" + + name + extra + "
" + "" + item.desc + " 
"; });