Skip to content

Commit 87a0ed1

Browse files
tausbnCopilot
andcommitted
Rust: fix LoadCargoConfig defaults (proc_macro_processes must be >= 1)
Setting proc_macro_processes to 0 causes an index-out-of-bounds panic in ProcMacroServerPool::new when the proc macro server is enabled. Use the same defaults as rust-analyzer itself (1 each). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8747228 commit 87a0ed1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rust/extractor/src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ impl Config {
197197
load_out_dirs_from_check: true,
198198
with_proc_macro_server: self.proc_macro_server_choice(dir),
199199
prefill_caches: false,
200-
num_worker_threads: 0,
201-
proc_macro_processes: 0,
200+
num_worker_threads: 1,
201+
proc_macro_processes: 1,
202202
},
203203
)
204204
}

0 commit comments

Comments
 (0)