aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/display
diff options
context:
space:
mode:
authorlumenian <[email protected]>2021-02-02 14:47:56 +0000
committerlumenian <[email protected]>2021-02-02 14:47:56 +0000
commitcafaab8b9659d3b05f50b39c4731494b976b4357 (patch)
treea0e1c3299f56e141b535f380a5da7a1ab30bf41e /crates/ide/src/display
parent96f9f0741f0b1ba345f35637cd5b21f5fad2a354 (diff)
Show alias underlying type
Diffstat (limited to 'crates/ide/src/display')
-rw-r--r--crates/ide/src/display/short_label.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ide/src/display/short_label.rs b/crates/ide/src/display/short_label.rs
index 7ac050473..84b8883de 100644
--- a/crates/ide/src/display/short_label.rs
+++ b/crates/ide/src/display/short_label.rs
@@ -61,7 +61,11 @@ impl ShortLabel for ast::BlockExpr {
61 61
62impl ShortLabel for ast::TypeAlias { 62impl ShortLabel for ast::TypeAlias {
63 fn short_label(&self) -> Option<String> { 63 fn short_label(&self) -> Option<String> {
64 short_label_from_node(self, "type ") 64 let mut buf = short_label_from_node(self, "type ")?;
65 if let Some(type_ref) = self.ty() {
66 format_to!(buf, " = {}", type_ref.syntax());
67 }
68 Some(buf)
65 } 69 }
66} 70}
67 71