mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Bring back the hex in const hover
This commit is contained in:
parent
e6ba791dce
commit
ae8ce99d97
4 changed files with 66 additions and 12 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue