From 0d8d9186563637f493ac7691268319373251b18a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 2 Mar 2019 23:59:04 +0300 Subject: add skeleton for macro-aware name resolutions --- crates/ra_db/src/input.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/ra_db') diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs index e45a510b3..2b1001d48 100644 --- a/crates/ra_db/src/input.rs +++ b/crates/ra_db/src/input.rs @@ -124,6 +124,10 @@ impl CrateGraph { self.arena.is_empty() } + pub fn iter<'a>(&'a self) -> impl Iterator + 'a { + self.arena.keys().map(|it| *it) + } + pub fn crate_root(&self, crate_id: CrateId) -> FileId { self.arena[&crate_id].file_id } -- cgit v1.2.3