mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
add skeleton for macro-aware name resolutions
This commit is contained in:
parent
65e763fa84
commit
0d8d918656
8 changed files with 773 additions and 9 deletions
|
@ -124,6 +124,10 @@ impl CrateGraph {
|
|||
self.arena.is_empty()
|
||||
}
|
||||
|
||||
pub fn iter<'a>(&'a self) -> impl Iterator<Item = CrateId> + 'a {
|
||||
self.arena.keys().map(|it| *it)
|
||||
}
|
||||
|
||||
pub fn crate_root(&self, crate_id: CrateId) -> FileId {
|
||||
self.arena[&crate_id].file_id
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue