File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
src/librustdoc/html/static Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 717717 return false ;
718718 }
719719
720+ function generateId ( ty ) {
721+ if ( ty . parent && ty . parent . name ) {
722+ return itemTypes [ ty . ty ] + ty . path + ty . parent . name + ty . name ;
723+ }
724+ return itemTypes [ ty . ty ] + ty . path + ty . name ;
725+ }
726+
720727 // quoted values mean literal search
721728 var nSearchWords = searchWords . length ;
722729 if ( ( val . charAt ( 0 ) === "\"" || val . charAt ( 0 ) === "'" ) &&
727734 var in_args = findArg ( searchIndex [ i ] , val , true ) ;
728735 var returned = checkReturned ( searchIndex [ i ] , val , true ) ;
729736 var ty = searchIndex [ i ] ;
730- var fullId = itemTypes [ ty . ty ] + ty . path + ty . name ;
737+ var fullId = generateId ( ty ) ;
731738
732739 if ( searchWords [ i ] === val . name ) {
733740 // filter type: ... queries
783790 if ( ! type ) {
784791 continue ;
785792 }
786- var fullId = itemTypes [ ty . ty ] + ty . path + ty . name ;
793+ var fullId = generateId ( ty ) ;
787794
788795 // allow searching for void (no output) functions as well
789796 var typeOutput = type . output ? type . output . name : "" ;
869876 var index = - 1 ;
870877 // we want lev results to go lower than others
871878 var lev = MAX_LEV_DISTANCE + 1 ;
872- var fullId = itemTypes [ ty . ty ] + ty . path + ty . name ;
879+ var fullId = generateId ( ty ) ;
873880
874881 if ( searchWords [ j ] . indexOf ( split [ i ] ) > - 1 ||
875882 searchWords [ j ] . indexOf ( val ) > - 1 ||
You can’t perform that action at this time.
0 commit comments