From 45fce9034909f2f0c5f6ac70eca7cf87ec3db856 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 4 Dec 2018 22:46:23 +0300 Subject: ModuleSource is ItemSource --- crates/ra_analysis/src/imp.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'crates/ra_analysis/src/imp.rs') 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 { Some(it) => it, }; let root = descr.crate_root(); - let file_id = root - .source() - .as_file() - .expect("root module always has a file as a source"); + let file_id = root.source().file_id(); let crate_graph = self.db.crate_graph(); let crate_id = crate_graph.crate_id_for_crate_root(file_id); -- cgit v1.2.3