Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/hover/render.rs')
| -rw-r--r-- | crates/ide/src/hover/render.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ide/src/hover/render.rs b/crates/ide/src/hover/render.rs index cd63131e7a..8ac268f243 100644 --- a/crates/ide/src/hover/render.rs +++ b/crates/ide/src/hover/render.rs @@ -349,11 +349,10 @@ pub(super) fn definition( Definition::Function(it) => label_and_docs(db, it), Definition::Adt(it) => label_and_docs(db, it), Definition::Variant(it) => label_value_and_docs(db, it, |&it| { - let hir_db: &dyn HirDatabase = db; - let body = hir_db.const_eval_variant(it.into()); + let body = it.eval(db); match body { Ok(x) => Some(format!("{}", x)), - Err(_) => it.value(db).map(|s| format!("{}", s)), + Err(_) => it.value(db).map(|x| format!("{}", x)), } }), Definition::Const(it) => label_value_and_docs(db, it, |it| { |