mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 21:54:42 +00:00
Don't show const items initializer expressions on hover
This commit is contained in:
parent
472641fc5b
commit
983726a45c
1 changed files with 1 additions and 5 deletions
|
@ -71,11 +71,7 @@ impl ShortLabel for ast::TypeAlias {
|
|||
|
||||
impl ShortLabel for ast::Const {
|
||||
fn short_label(&self) -> Option<String> {
|
||||
let mut new_buf = short_label_from_ty(self, self.ty(), "const ")?;
|
||||
if let Some(expr) = self.body() {
|
||||
format_to!(new_buf, " = {}", expr.syntax());
|
||||
}
|
||||
Some(new_buf)
|
||||
short_label_from_ty(self, self.ty(), "const ")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue