mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
make documenation a query
This commit is contained in:
parent
33026c654e
commit
2c28f5245d
3 changed files with 62 additions and 66 deletions
|
@ -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?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue