Skip to content

Commit a12b839

Browse files
committed
rustdoc: Do not deduplicate items when their parents differ.
Fixes #17332.
1 parent daa0745 commit a12b839

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustdoc/html/static/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,8 @@
313313
for (var i = results.length - 1; i > 0; i -= 1) {
314314
if (results[i].word === results[i - 1].word &&
315315
results[i].item.ty === results[i - 1].item.ty &&
316-
results[i].item.path === results[i - 1].item.path)
316+
results[i].item.path === results[i - 1].item.path &&
317+
(results[i].item.parent || {}).name === (results[i - 1].item.parent || {}).name)
317318
{
318319
results[i].id = -1;
319320
}

0 commit comments

Comments
 (0)