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 717
717
return false ;
718
718
}
719
719
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
+
720
727
// quoted values mean literal search
721
728
var nSearchWords = searchWords . length ;
722
729
if ( ( val . charAt ( 0 ) === "\"" || val . charAt ( 0 ) === "'" ) &&
727
734
var in_args = findArg ( searchIndex [ i ] , val , true ) ;
728
735
var returned = checkReturned ( searchIndex [ i ] , val , true ) ;
729
736
var ty = searchIndex [ i ] ;
730
- var fullId = itemTypes [ ty . ty ] + ty . path + ty . name ;
737
+ var fullId = generateId ( ty ) ;
731
738
732
739
if ( searchWords [ i ] === val . name ) {
733
740
// filter type: ... queries
783
790
if ( ! type ) {
784
791
continue ;
785
792
}
786
- var fullId = itemTypes [ ty . ty ] + ty . path + ty . name ;
793
+ var fullId = generateId ( ty ) ;
787
794
788
795
// allow searching for void (no output) functions as well
789
796
var typeOutput = type . output ? type . output . name : "" ;
869
876
var index = - 1 ;
870
877
// we want lev results to go lower than others
871
878
var lev = MAX_LEV_DISTANCE + 1 ;
872
- var fullId = itemTypes [ ty . ty ] + ty . path + ty . name ;
879
+ var fullId = generateId ( ty ) ;
873
880
874
881
if ( searchWords [ j ] . indexOf ( split [ i ] ) > - 1 ||
875
882
searchWords [ j ] . indexOf ( val ) > - 1 ||
You can’t perform that action at this time.
0 commit comments