From cafaab8b9659d3b05f50b39c4731494b976b4357 Mon Sep 17 00:00:00 2001 From: lumenian Date: Tue, 2 Feb 2021 17:47:56 +0300 Subject: Show alias underlying type --- crates/ide/src/display/short_label.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crates/ide/src/display') 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 { impl ShortLabel for ast::TypeAlias { fn short_label(&self) -> Option { - 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) } } -- cgit v1.2.3