mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
nail down runnables
This commit is contained in:
parent
1329dd4e28
commit
e98d8cd255
8 changed files with 142 additions and 25 deletions
|
@ -151,7 +151,7 @@ impl AnalysisImpl {
|
|||
.collect()
|
||||
}
|
||||
|
||||
pub fn crate_root(&self, id: FileId) -> Vec<CrateId> {
|
||||
pub fn crate_for(&self, id: FileId) -> Vec<CrateId> {
|
||||
let module_map = &self.data.module_map;
|
||||
let crate_graph = &self.data.crate_graph;
|
||||
let mut res = Vec::new();
|
||||
|
@ -177,7 +177,9 @@ impl AnalysisImpl {
|
|||
}
|
||||
res
|
||||
}
|
||||
|
||||
pub fn crate_root(&self, crate_id: CrateId) -> FileId {
|
||||
self.data.crate_graph.crate_roots[&crate_id]
|
||||
}
|
||||
pub fn approximately_resolve_symbol(
|
||||
&self,
|
||||
id: FileId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue