Skip to content

Commit

Permalink
rustdoc-search: show all generics if implDisamiguator is set
Browse files Browse the repository at this point in the history
This cleans up the Simd page. It should be sufficient, even though
it can wind up showing more than necessary, but allows each item
to be considered in isolation.
  • Loading branch information
notriddle committed Oct 25, 2023
1 parent 8206a6c commit 42616b3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/librustdoc/html/static/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,10 @@ function initSearch(rawSearchIndex) {
}
} else {
push(fnType.name, fnType.highlighted);
if (fnType.generics && fnType.generics.some(isTransitivelyHighlighted)) {
if (fnType.generics && fnType.generics.length > 0 &&
(fnType.generics.some(isTransitivelyHighlighted)
|| row.implDisambiguator !== null)
) {
pushNotHighlighted("<");
formatTypeList(fnType.generics, ", ");
pushNotHighlighted(">");
Expand Down

0 comments on commit 42616b3

Please sign in to comment.