Merge #10796
10796: ide: display static values in hover r=Veykril a=jhgg Continuation from #10785 - does the same thing, but for `static`'s as well. Co-authored-by: Jake Heinz <jh@discordapp.com>
This commit is contained in:
@@ -1497,6 +1497,10 @@ impl Static {
|
||||
db.static_data(self.id).mutable
|
||||
}
|
||||
|
||||
pub fn value(self, db: &dyn HirDatabase) -> Option<ast::Expr> {
|
||||
self.source(db)?.value.body()
|
||||
}
|
||||
|
||||
pub fn ty(self, db: &dyn HirDatabase) -> Type {
|
||||
let data = db.static_data(self.id);
|
||||
let resolver = self.id.resolver(db.upcast());
|
||||
|
||||
Reference in New Issue
Block a user