From 42616b357828299db9a1705d7bacaa12a35d0e46 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Tue, 24 Oct 2023 10:05:05 -0700 Subject: [PATCH] rustdoc-search: show all generics if implDisamiguator is set 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. --- src/librustdoc/html/static/js/search.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/librustdoc/html/static/js/search.js b/src/librustdoc/html/static/js/search.js index 576db7115ec97..83d6d5d0b61d1 100644 --- a/src/librustdoc/html/static/js/search.js +++ b/src/librustdoc/html/static/js/search.js @@ -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(">");