diff options
Diffstat (limited to 'crates/ra_ide/src/display')
-rw-r--r-- | crates/ra_ide/src/display/short_label.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/crates/ra_ide/src/display/short_label.rs b/crates/ra_ide/src/display/short_label.rs index b5ff9fa2d..d8acb3be7 100644 --- a/crates/ra_ide/src/display/short_label.rs +++ b/crates/ra_ide/src/display/short_label.rs | |||
@@ -61,7 +61,15 @@ impl ShortLabel for ast::TypeAlias { | |||
61 | 61 | ||
62 | impl ShortLabel for ast::Const { | 62 | impl ShortLabel for ast::Const { |
63 | fn short_label(&self) -> Option<String> { | 63 | fn short_label(&self) -> Option<String> { |
64 | short_label_from_ty(self, self.ty(), "const ") | 64 | match short_label_from_ty(self, self.ty(), "const ") { |
65 | Some(buf) => { | ||
66 | let mut new_buf = buf; | ||
67 | let body = self.body().unwrap(); | ||
68 | format_to!(new_buf, " = {}", body.syntax()); | ||
69 | Some(new_buf) | ||
70 | } | ||
71 | None => None, | ||
72 | } | ||
65 | } | 73 | } |
66 | } | 74 | } |
67 | 75 | ||