@@ -3255,6 +3255,7 @@ fn render_spotlight_traits(item: &clean::Item) -> Result<String, fmt::Error> {
3255
3255
3256
3256
fn spotlight_decl ( decl : & clean:: FnDecl ) -> Result < String , fmt:: Error > {
3257
3257
let mut out = String :: new ( ) ;
3258
+ let mut trait_ = String :: new ( ) ;
3258
3259
3259
3260
if let Some ( did) = decl. output . def_id ( ) {
3260
3261
let c = cache ( ) ;
@@ -3265,9 +3266,10 @@ fn spotlight_decl(decl: &clean::FnDecl) -> Result<String, fmt::Error> {
3265
3266
. map_or ( false , |t| t. is_spotlight ) {
3266
3267
if out. is_empty ( ) {
3267
3268
out. push_str (
3268
- & format ! ( "<h3 class=\" important\" >Important traits for {}</h3>" ,
3269
+ & format ! ( "<h3 class=\" important\" >Important traits for {}</h3>\
3270
+ <code class=\" content\" >",
3269
3271
impl_. for_) ) ;
3270
- out . push_str ( "<code class= \" content \" >" ) ;
3272
+ trait_ . push_str ( & format ! ( "{}" , impl_ . for_ ) ) ;
3271
3273
}
3272
3274
3273
3275
//use the "where" class here to make it small
@@ -3288,8 +3290,11 @@ fn spotlight_decl(decl: &clean::FnDecl) -> Result<String, fmt::Error> {
3288
3290
}
3289
3291
3290
3292
if !out. is_empty ( ) {
3291
- out. insert_str ( 0 , "<div class=\" important-traits\" >ⓘ<div class=\" content hidden\" >" ) ;
3292
- out. push_str ( "</code></span></div></div>" ) ;
3293
+ out. insert_str ( 0 , & format ! ( "<div class=\" important-traits\" ><div class='tooltip'>ⓘ\
3294
+ <span class='tooltiptext'>Important traits for {}</span></div>\
3295
+ <div class=\" content hidden\" >",
3296
+ trait_) ) ;
3297
+ out. push_str ( "</code></div></div>" ) ;
3293
3298
}
3294
3299
3295
3300
Ok ( out)
0 commit comments