mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
use Source for module, part 2
This commit is contained in:
parent
0145d06515
commit
dd63f17027
3 changed files with 8 additions and 8 deletions
|
@ -210,11 +210,11 @@ impl Module {
|
|||
pub fn declaration_source(
|
||||
self,
|
||||
db: &(impl DefDatabase + AstDatabase),
|
||||
) -> Option<(HirFileId, TreeArc<ast::Module>)> {
|
||||
) -> Option<Source<TreeArc<ast::Module>>> {
|
||||
let def_map = db.crate_def_map(self.krate);
|
||||
let decl = def_map[self.module_id].declaration?;
|
||||
let ast = decl.to_node(db);
|
||||
Some((decl.file_id(), ast))
|
||||
Some((decl.file_id(), ast).into())
|
||||
}
|
||||
|
||||
/// Returns the syntax of the last path segment corresponding to this import
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue