Unnamed repository; edit this file 'description' to name the repository.
Merge pull request #22506 from Veykril/push-snorzkqtonqz
Kill proc-macro-srv processes on shutdown
| -rw-r--r-- | crates/proc-macro-srv/Cargo.toml | 4 | ||||
| -rw-r--r-- | crates/rust-analyzer/src/main_loop.rs | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/crates/proc-macro-srv/Cargo.toml b/crates/proc-macro-srv/Cargo.toml index c3cd447c85..4667542090 100644 --- a/crates/proc-macro-srv/Cargo.toml +++ b/crates/proc-macro-srv/Cargo.toml @@ -36,7 +36,11 @@ proc-macro-test.path = "./proc-macro-test" [features] default = [] +# default = ["sysroot-abi"] sysroot-abi = [] [lints] workspace = true + +[package.metadata.rust-analyzer] +rustc_private=true diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs index 5ed522ceee..92d5323e96 100644 --- a/crates/rust-analyzer/src/main_loop.rs +++ b/crates/rust-analyzer/src/main_loop.rs @@ -1267,6 +1267,10 @@ impl GlobalState { let mut dispatcher = RequestDispatcher { req: Some(req), global_state: self }; dispatcher.on_sync_mut::<lsp_types::request::Shutdown>(|s, ()| { s.shutdown_requested = true; + s.proc_macro_clients = + std::iter::repeat_with(|| None).take(s.proc_macro_clients.len()).collect(); + s.flycheck.iter().for_each(|handle| handle.cancel()); + s.discover_handles.clear(); Ok(()) }); |