mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
ModuleSource is ItemSource
This commit is contained in:
parent
a9e4142f43
commit
45fce90349
4 changed files with 40 additions and 51 deletions
|
@ -190,10 +190,7 @@ impl AnalysisImpl {
|
|||
Some(it) => it,
|
||||
};
|
||||
let root = descr.crate_root();
|
||||
let file_id = root
|
||||
.source()
|
||||
.as_file()
|
||||
.expect("root module always has a file as a source");
|
||||
let file_id = root.source().file_id();
|
||||
|
||||
let crate_graph = self.db.crate_graph();
|
||||
let crate_id = crate_graph.crate_id_for_crate_root(file_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue