aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-12-04 19:46:23 +0000
committerAleksey Kladov <[email protected]>2018-12-04 19:46:23 +0000
commit45fce9034909f2f0c5f6ac70eca7cf87ec3db856 (patch)
treee8c664b75784b4395953ba6326514605e4ba40ab /crates/ra_analysis/src
parenta9e4142f434b1a2aa0729387534121fdf9c812a6 (diff)
ModuleSource is ItemSource
Diffstat (limited to 'crates/ra_analysis/src')
-rw-r--r--crates/ra_analysis/src/imp.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs
index f5cb3550e..942b5b945 100644
--- a/crates/ra_analysis/src/imp.rs
+++ b/crates/ra_analysis/src/imp.rs
@@ -190,10 +190,7 @@ impl AnalysisImpl {
190 Some(it) => it, 190 Some(it) => it,
191 }; 191 };
192 let root = descr.crate_root(); 192 let root = descr.crate_root();
193 let file_id = root 193 let file_id = root.source().file_id();
194 .source()
195 .as_file()
196 .expect("root module always has a file as a source");
197 194
198 let crate_graph = self.db.crate_graph(); 195 let crate_graph = self.db.crate_graph();
199 let crate_id = crate_graph.crate_id_for_crate_root(file_id); 196 let crate_id = crate_graph.crate_id_for_crate_root(file_id);