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 720720 return false ;
721721 }
722722
723+ function generateId ( ty ) {
724+ if ( ty . parent && ty . parent . name ) {
725+ return itemTypes [ ty . ty ] + ty . path + ty . parent . name + ty . name ;
726+ }
727+ return itemTypes [ ty . ty ] + ty . path + ty . name ;
728+ }
729+
723730 // quoted values mean literal search
724731 var nSearchWords = searchWords . length ;
725732 if ( ( val . charAt ( 0 ) === "\"" || val . charAt ( 0 ) === "'" ) &&
730737 var in_args = findArg ( searchIndex [ i ] , val , true ) ;
731738 var returned = checkReturned ( searchIndex [ i ] , val , true ) ;
732739 var ty = searchIndex [ i ] ;
733- var fullId = itemTypes [ ty . ty ] + ty . path + ty . name ;
740+ var fullId = generateId ( ty ) ;
734741
735742 if ( searchWords [ i ] === val . name ) {
736743 // filter type: ... queries
786793 if ( ! type ) {
787794 continue ;
788795 }
789- var fullId = itemTypes [ ty . ty ] + ty . path + ty . name ;
796+ var fullId = generateId ( ty ) ;
790797
791798 // allow searching for void (no output) functions as well
792799 var typeOutput = type . output ? type . output . name : "" ;
872879 var index = - 1 ;
873880 // we want lev results to go lower than others
874881 var lev = MAX_LEV_DISTANCE + 1 ;
875- var fullId = itemTypes [ ty . ty ] + ty . path + ty . name ;
882+ var fullId = generateId ( ty ) ;
876883
877884 if ( searchWords [ j ] . indexOf ( split [ i ] ) > - 1 ||
878885 searchWords [ j ] . indexOf ( val ) > - 1 ||
You can’t perform that action at this time.
0 commit comments