diff options
Diffstat (limited to 'crates/ra_analysis/src/imp.rs')
-rw-r--r-- | crates/ra_analysis/src/imp.rs | 5 |
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); |