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 24, 2023
1 parent f5654ea commit c3a08be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/librustdoc/html/static/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,9 @@ 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) || fnType.implDisambiguator !== null)

Check failure on line 1271 in src/librustdoc/html/static/js/search.js

View workflow job for this annotation

GitHub Actions / PR - mingw-check-tidy

line longer than 100 chars
) {
pushNotHighlighted("<");
formatTypeList(fnType.generics, ", ");
pushNotHighlighted(">");
Expand Down

0 comments on commit c3a08be

Please sign in to comment.