File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
src/librustdoc/html/static Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 1079
1079
return output ;
1080
1080
}
1081
1081
1082
- function makeTabHeader ( tabNb , text ) {
1082
+ function makeTabHeader ( tabNb , text , nbElems ) {
1083
1083
if ( currentTab === tabNb ) {
1084
- return '<div class="selected">' + text + '</div>' ;
1084
+ return '<div class="selected">' + text +
1085
+ ' <div class="count">(' + nbElems + ')</div></div>' ;
1085
1086
}
1086
- return '<div>' + text + '</div>' ;
1087
+ return '<div>' + text + ' <div class="count">(' + nbElems + ')</div> </div>';
1087
1088
}
1088
1089
1089
1090
function showResults ( results ) {
1093
1094
output = '<h1>Results for ' + escape ( query . query ) +
1094
1095
( query . type ? ' (type: ' + escape ( query . type ) + ')' : '' ) + '</h1>' +
1095
1096
'<div id="titles">' +
1096
- makeTabHeader ( 0 , "Types/modules" ) +
1097
- makeTabHeader ( 1 , "As parameters" ) +
1098
- makeTabHeader ( 2 , "As return value" ) +
1097
+ makeTabHeader ( 0 , "Types/modules" , results [ 'others' ] . length ) +
1098
+ makeTabHeader ( 1 , "As parameters" , results [ 'in_args' ] . length ) +
1099
+ makeTabHeader ( 2 , "As return value" , results [ 'returned' ] . length ) +
1099
1100
'</div><div id="results">' ;
1100
1101
1101
1102
output += addTab ( results [ 'others' ] , query ) ;
Original file line number Diff line number Diff line change @@ -945,3 +945,9 @@ pre.rust {
945
945
# titles > div : hover {
946
946
border-bottom : 3px solid # 0089ff ;
947
947
}
948
+
949
+ # titles > div > div .count {
950
+ display : inline-block;
951
+ color : # 888 ;
952
+ font-size : 16px ;
953
+ }
You can’t perform that action at this time.
0 commit comments