make documenation a query

This commit is contained in:
Aleksey Kladov 2019-06-08 14:36:39 +03:00
parent 33026c654e
commit 2c28f5245d
3 changed files with 62 additions and 66 deletions

View file

@ -196,7 +196,7 @@ impl Module {
/// `None` for the crate root.
pub fn declaration_source(
self,
db: &impl HirDatabase,
db: &(impl DefDatabase + AstDatabase),
) -> Option<(HirFileId, TreeArc<ast::Module>)> {
let def_map = db.crate_def_map(self.krate);
let decl = def_map[self.module_id].declaration?;