From 9b1356464a834e0b9a88dd3eeabc50bf1d734f35 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 8 Dec 2018 23:16:11 +0300 Subject: propagate deps to CrateGraph --- crates/ra_db/src/input.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/ra_db/src') diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs index 7d9faa43c..a48d05b98 100644 --- a/crates/ra_db/src/input.rs +++ b/crates/ra_db/src/input.rs @@ -48,6 +48,9 @@ impl CrateGraph { assert!(prev.is_none()); crate_id } + //FIXME: check that we don't have cycles here. + // Just a simple depth first search from `to` should work, + // the graph is small. pub fn add_dep(&mut self, from: CrateId, to: CrateId) { self.arena.get_mut(&from).unwrap().add_dep(to) } -- cgit v1.2.3