File tree Expand file tree Collapse file tree 2 files changed +12
-16
lines changed
src/librustdoc/html/static Expand file tree Collapse file tree 2 files changed +12
-16
lines changed Original file line number Diff line number Diff line change 796796 display : inline-block;
797797}
798798
799- .result-name span .primitive ::after {
800- content : ' (primitive type)' ;
801- font-style : italic;
802- }
803-
804- .result-name span .keyword ::after {
805- content : ' (keyword)' ;
806- font-style : italic;
807- }
808-
809799body .blur > : not (# help ) {
810800 filter : blur (8px );
811801 -webkit-filter : blur (8px );
Original file line number Diff line number Diff line change @@ -975,26 +975,32 @@ window.initSearch = function(rawSearchIndex) {
975975 output = "<div class=\"search-results " + extraClass + "\">" ;
976976
977977 array . forEach ( function ( item ) {
978- var name , type ;
979-
980- name = item . name ;
981- type = itemTypes [ item . ty ] ;
982-
983978 if ( item . is_alias !== true ) {
984979 if ( duplicates [ item . fullPath ] ) {
985980 return ;
986981 }
987982 duplicates [ item . fullPath ] = true ;
988983 }
984+
985+ var name = item . name ;
986+ var type = itemTypes [ item . ty ] ;
987+
989988 length += 1 ;
990989
990+ var extra = "" ;
991+ if ( type === "primitive" ) {
992+ extra = " <i>(primitive type)</i>" ;
993+ } else if ( type === "keyword" ) {
994+ extra = " <i>(keyword)</i>" ;
995+ }
996+
991997 output += "<a class=\"result-" + type + "\" href=\"" + item . href + "\">" +
992998 "<div><div class=\"result-name\">" +
993999 ( item . is_alias === true ?
9941000 ( "<span class=\"alias\"><b>" + item . alias + " </b></span><span " +
9951001 "class=\"grey\"><i> - see </i></span>" ) : "" ) +
9961002 item . displayPath + "<span class=\"" + type + "\">" +
997- name + "</span></div><div class=\"desc\">" +
1003+ name + extra + "</span></div><div class=\"desc\">" +
9981004 "<span>" + item . desc +
9991005 " </span></div></div></a>" ;
10001006 } ) ;
You can’t perform that action at this time.
0 commit comments