Skip to content

Commit e28502e

Browse files
Fix search fn keyword
1 parent 1dd1f95 commit e28502e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/librustdoc/html/static/main.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,10 @@
465465
var res = buildHrefAndPath(obj);
466466
obj.displayPath = pathSplitter(res[0]);
467467
obj.fullPath = obj.displayPath + obj.name;
468+
if (obj.ty === TY_KEYWORD) {
469+
// To be sure than it isn't considered as duplicate with items.
470+
obj.fullPath += '|k';
471+
}
468472
obj.href = res[1];
469473
out.push(obj);
470474
if (out.length >= MAX_RESULTS) {
@@ -781,7 +785,7 @@
781785
case "fn":
782786
return (name == "method" || name == "tymethod");
783787
case "type":
784-
return (name == "primitive");
788+
return (name == "primitive" || name == "keyword");
785789
}
786790

787791
// No match

0 commit comments

Comments
 (0)