Skip to content

Commit 343030e

Browse files
committed
properly pass through where_clause
1 parent d8973ed commit 343030e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/librustdoc/html/static/js/search.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2727,7 +2727,12 @@ class DocSearch {
27272727
// deprioritize "clone-like" results,
27282728
// ie. functions that also take the queried type as an argument.
27292729
const hasType = result.item && result.item.type;
2730-
if (hasType && containsTypeFromQuery(result.item.type.inputs)) {
2730+
if (!hasType) {
2731+
continue;
2732+
}
2733+
const inputs = result.item.type.inputs;
2734+
const where_clause = result.item.where_clause;
2735+
if (containsTypeFromQuery(inputs, where_clause)) {
27312736
result.path_dist *= 100;
27322737
result.dist *= 100;
27332738
}

0 commit comments

Comments
 (0)