aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/krate.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/krate.rs')
-rw-r--r--crates/ra_hir/src/krate.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_hir/src/krate.rs b/crates/ra_hir/src/krate.rs
index 89b1e639e..a0821d15d 100644
--- a/crates/ra_hir/src/krate.rs
+++ b/crates/ra_hir/src/krate.rs
@@ -1,6 +1,6 @@
1pub use ra_db::CrateId; 1pub use ra_db::{CrateId, Cancelable};
2 2
3use crate::{HirDatabase, Module, Cancelable, Name, AsName}; 3use crate::{HirDatabase, Module, Name, AsName, HirFileId};
4 4
5/// hir::Crate describes a single crate. It's the main inteface with which 5/// hir::Crate describes a single crate. It's the main inteface with which
6/// crate's dependencies interact. Mostly, it should be just a proxy for the 6/// crate's dependencies interact. Mostly, it should be just a proxy for the
@@ -35,6 +35,7 @@ impl Crate {
35 let crate_graph = db.crate_graph(); 35 let crate_graph = db.crate_graph();
36 let file_id = crate_graph.crate_root(self.crate_id); 36 let file_id = crate_graph.crate_root(self.crate_id);
37 let source_root_id = db.file_source_root(file_id); 37 let source_root_id = db.file_source_root(file_id);
38 let file_id = HirFileId::from(file_id);
38 let module_tree = db.module_tree(source_root_id)?; 39 let module_tree = db.module_tree(source_root_id)?;
39 // FIXME: teach module tree about crate roots instead of guessing 40 // FIXME: teach module tree about crate roots instead of guessing
40 let (module_id, _) = ctry!(module_tree 41 let (module_id, _) = ctry!(module_tree