diff options
author | Lukas Wirth <[email protected]> | 2021-03-09 15:33:23 +0000 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-03-09 15:33:23 +0000 |
commit | 983726a45cf3daafbf4b245e220773bd12897bb7 (patch) | |
tree | c18700afbf82be4004dbc24c3d2b80fb5c562dcd /crates/ide | |
parent | 472641fc5beee1f998d46de70351bcb572d6226c (diff) |
Don't show const items initializer expressions on hover
Diffstat (limited to 'crates/ide')
-rw-r--r-- | crates/ide/src/display/short_label.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crates/ide/src/display/short_label.rs b/crates/ide/src/display/short_label.rs index 84b8883de..2df9266b4 100644 --- a/crates/ide/src/display/short_label.rs +++ b/crates/ide/src/display/short_label.rs | |||
@@ -71,11 +71,7 @@ impl ShortLabel for ast::TypeAlias { | |||
71 | 71 | ||
72 | impl ShortLabel for ast::Const { | 72 | impl ShortLabel for ast::Const { |
73 | fn short_label(&self) -> Option<String> { | 73 | fn short_label(&self) -> Option<String> { |
74 | let mut new_buf = short_label_from_ty(self, self.ty(), "const ")?; | 74 | short_label_from_ty(self, self.ty(), "const ") |
75 | if let Some(expr) = self.body() { | ||
76 | format_to!(new_buf, " = {}", expr.syntax()); | ||
77 | } | ||
78 | Some(new_buf) | ||
79 | } | 75 | } |
80 | } | 76 | } |
81 | 77 | ||