diff options
author | lumenian <[email protected]> | 2021-02-02 14:47:56 +0000 |
---|---|---|
committer | lumenian <[email protected]> | 2021-02-02 14:47:56 +0000 |
commit | cafaab8b9659d3b05f50b39c4731494b976b4357 (patch) | |
tree | a0e1c3299f56e141b535f380a5da7a1ab30bf41e | |
parent | 96f9f0741f0b1ba345f35637cd5b21f5fad2a354 (diff) |
Show alias underlying type
-rw-r--r-- | crates/ide/src/display/short_label.rs | 6 |
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 | ||
62 | impl ShortLabel for ast::TypeAlias { | 62 | impl 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 | ||