From 46c5b557fe03572386ed82218e31f2439572ef50 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Fri, 18 Sep 2020 19:27:19 +0200 Subject: Log failure to load crate root file --- crates/project_model/src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'crates/project_model/src') diff --git a/crates/project_model/src/lib.rs b/crates/project_model/src/lib.rs index 288c39e49..258f60e28 100644 --- a/crates/project_model/src/lib.rs +++ b/crates/project_model/src/lib.rs @@ -308,7 +308,13 @@ impl ProjectWorkspace { .crates() .filter_map(|(crate_id, krate)| { let file_path = &krate.root_module; - let file_id = load(&file_path)?; + let file_id = match load(&file_path) { + Some(id) => id, + None => { + log::error!("failed to load crate root {}", file_path.display()); + return None; + } + }; let env = krate.env.clone().into_iter().collect(); let proc_macro = krate -- cgit v1.2.3