Bring back the hex in const hover

This commit is contained in:
hkalbasi 2023-03-05 13:53:49 +03:30
parent e6ba791dce
commit ae8ce99d97
4 changed files with 66 additions and 12 deletions

View file

@ -432,9 +432,9 @@ pub(super) fn definition(
}
}),
Definition::Const(it) => label_value_and_docs(db, it, |it| {
let body = it.eval(db);
let body = it.render_eval(db);
match body {
Ok(x) => Some(format!("{}", x.display(db))),
Ok(x) => Some(x),
Err(_) => {
let source = it.source(db)?;
let mut body = source.value.body()?.syntax().clone();