We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 56dbb3e commit 6f21008Copy full SHA for 6f21008
src/librustdoc/html/static/main.js
@@ -371,6 +371,11 @@
371
return false;
372
}
373
374
+ function checkReturned(obj, val) {
375
+ return obj && obj.type && obj.type.output &&
376
+ obj.type.output.name.toLowerCase() === val;
377
+ }
378
+
379
function typePassesFilter(filter, type) {
380
// No filter
381
if (filter < 0) return true;
@@ -503,6 +508,15 @@
503
508
lev: lev_distance,
504
509
});
505
510
511
+ } else if (checkReturned(searchIndex[j], val)) {
512
+ if (typePassesFilter(typeFilter, searchIndex[j].ty)) {
513
+ results.push({
514
+ id: j,
515
+ index: 0,
516
+ // we want lev results to go lower than others
517
+ lev: lev_distance,
518
+ });
519
506
520
507
521
if (results.length === max) {
522
break;
0 commit comments