fix: Fix server panicking on project loading when proc-macros are disabled

This commit is contained in:
Lukas Wirth
2022-07-26 16:30:45 +02:00
parent 1c752841e2
commit c8ff70e924
2 changed files with 8 additions and 3 deletions

View File

@@ -66,7 +66,9 @@ pub fn load_workspace(
};
let crate_graph = ws.to_crate_graph(
&mut |_, path: &AbsPath| load_proc_macro(proc_macro_client.as_ref(), path, &[]),
&mut |_, path: &AbsPath| {
load_proc_macro(proc_macro_client.as_ref().map_err(|e| &**e), path, &[])
},
&mut |path: &AbsPath| {
let contents = loader.load_sync(path);
let path = vfs::VfsPath::from(path.to_path_buf());