File tree 1 file changed +10
-3
lines changed
src/librustdoc/html/static
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 720
720
return false ;
721
721
}
722
722
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
+
723
730
// quoted values mean literal search
724
731
var nSearchWords = searchWords . length ;
725
732
if ( ( val . charAt ( 0 ) === "\"" || val . charAt ( 0 ) === "'" ) &&
730
737
var in_args = findArg ( searchIndex [ i ] , val , true ) ;
731
738
var returned = checkReturned ( searchIndex [ i ] , val , true ) ;
732
739
var ty = searchIndex [ i ] ;
733
- var fullId = itemTypes [ ty . ty ] + ty . path + ty . name ;
740
+ var fullId = generateId ( ty ) ;
734
741
735
742
if ( searchWords [ i ] === val . name ) {
736
743
// filter type: ... queries
786
793
if ( ! type ) {
787
794
continue ;
788
795
}
789
- var fullId = itemTypes [ ty . ty ] + ty . path + ty . name ;
796
+ var fullId = generateId ( ty ) ;
790
797
791
798
// allow searching for void (no output) functions as well
792
799
var typeOutput = type . output ? type . output . name : "" ;
872
879
var index = - 1 ;
873
880
// we want lev results to go lower than others
874
881
var lev = MAX_LEV_DISTANCE + 1 ;
875
- var fullId = itemTypes [ ty . ty ] + ty . path + ty . name ;
882
+ var fullId = generateId ( ty ) ;
876
883
877
884
if ( searchWords [ j ] . indexOf ( split [ i ] ) > - 1 ||
878
885
searchWords [ j ] . indexOf ( val ) > - 1 ||
You can’t perform that action at this time.
0 commit comments