Rollup merge of #39697 - notriddle:rustdoc_tooltip, r=GuillaumeGomez
Add the item type to the tooltip See: https://users.rust-lang.org/t/seeking-opinions-from-colorblind-rustaceans-coloring-in-rustdoc-code-blocks
This commit is contained in:
commit
0095ec25cc
@ -550,8 +550,8 @@ impl<'a> fmt::Display for HRef<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match href(self.did) {
|
||||
Some((url, shortty, fqp)) => if !f.alternate() {
|
||||
write!(f, "<a class='{}' href='{}' title='{}'>{}</a>",
|
||||
shortty, url, fqp.join("::"), self.text)
|
||||
write!(f, "<a class='{}' href='{}' title='{} {}'>{}</a>",
|
||||
shortty, url, shortty, fqp.join("::"), self.text)
|
||||
} else {
|
||||
write!(f, "{}", self.text)
|
||||
},
|
||||
|
@ -1818,7 +1818,7 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context,
|
||||
write!(w, "
|
||||
<tr class='{stab} module-item'>
|
||||
<td><a class='{class}' href='{href}'
|
||||
title='{title}'>{name}</a>{unsafety_flag}</td>
|
||||
title='{title_type} {title}'>{name}</a>{unsafety_flag}</td>
|
||||
<td class='docblock-short'>
|
||||
{stab_docs} {docs}
|
||||
</td>
|
||||
@ -1830,6 +1830,7 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context,
|
||||
stab = myitem.stability_class(),
|
||||
unsafety_flag = unsafety_flag,
|
||||
href = item_path(myitem.type_(), myitem.name.as_ref().unwrap()),
|
||||
title_type = myitem.type_(),
|
||||
title = full_path(cx, myitem))?;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user