aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_db
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-03-02 20:59:04 +0000
committerAleksey Kladov <[email protected]>2019-03-17 09:46:13 +0000
commit0d8d9186563637f493ac7691268319373251b18a (patch)
treeed5c887e53ee7896c719c58cb1463ce2d57f7432 /crates/ra_db
parent65e763fa84ae70ec9cee13f434acaae5371ad8e5 (diff)
add skeleton for macro-aware name resolutions
Diffstat (limited to 'crates/ra_db')
-rw-r--r--crates/ra_db/src/input.rs4
1 files changed, 4 insertions, 0 deletions
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 {
124 self.arena.is_empty() 124 self.arena.is_empty()
125 } 125 }
126 126
127 pub fn iter<'a>(&'a self) -> impl Iterator<Item = CrateId> + 'a {
128 self.arena.keys().map(|it| *it)
129 }
130
127 pub fn crate_root(&self, crate_id: CrateId) -> FileId { 131 pub fn crate_root(&self, crate_id: CrateId) -> FileId {
128 self.arena[&crate_id].file_id 132 self.arena[&crate_id].file_id
129 } 133 }