mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-13 23:42:56 +00:00
Merge #7520
7520: Show alias underlying type r=lnicola a=lumenian Closes #7511 Display underlying type in the tooltip: ```rust pub type SomeAlias = f64 ``` instead of: ```rust pub type SomeAlias ``` Co-authored-by: lumenian <lumenian@gmail.com>
This commit is contained in:
commit
cc3112de1b
@ -61,7 +61,11 @@ impl ShortLabel for ast::BlockExpr {
|
||||
|
||||
impl ShortLabel for ast::TypeAlias {
|
||||
fn short_label(&self) -> Option<String> {
|
||||
short_label_from_node(self, "type ")
|
||||
let mut buf = short_label_from_node(self, "type ")?;
|
||||
if let Some(type_ref) = self.ty() {
|
||||
format_to!(buf, " = {}", type_ref.syntax());
|
||||
}
|
||||
Some(buf)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user