diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-09-18 18:28:30 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-09-18 18:28:30 +0100 |
commit | e49a0677adc6afe090b8fac04ae8e2b8f9f2e631 (patch) | |
tree | 324d5fad96da471a824b2090846533c442b0b469 /crates/project_model | |
parent | bd8ba80b1bc7a251510ae8f7a25c9c9d78d3ef69 (diff) | |
parent | 46c5b557fe03572386ed82218e31f2439572ef50 (diff) |
Merge #6035
6035: Log failure to load crate root file r=jonas-schievink a=jonas-schievink
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/project_model')
-rw-r--r-- | crates/project_model/src/lib.rs | 8 |
1 files changed, 7 insertions, 1 deletions
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 { | |||
308 | .crates() | 308 | .crates() |
309 | .filter_map(|(crate_id, krate)| { | 309 | .filter_map(|(crate_id, krate)| { |
310 | let file_path = &krate.root_module; | 310 | let file_path = &krate.root_module; |
311 | let file_id = load(&file_path)?; | 311 | let file_id = match load(&file_path) { |
312 | Some(id) => id, | ||
313 | None => { | ||
314 | log::error!("failed to load crate root {}", file_path.display()); | ||
315 | return None; | ||
316 | } | ||
317 | }; | ||
312 | 318 | ||
313 | let env = krate.env.clone().into_iter().collect(); | 319 | let env = krate.env.clone().into_iter().collect(); |
314 | let proc_macro = krate | 320 | let proc_macro = krate |