Skip to content

Commit 97cdf3e

Browse files
committed
Try not to invalidate our state when the proc macro preference didn't change
1 parent dd3f5e0 commit 97cdf3e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

crates/rust-analyzer/src/reload.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,13 @@ impl GlobalState {
5555
self.reload_flycheck();
5656
}
5757

58-
// Apply experimental feature flags.
59-
self.analysis_host
60-
.raw_database_mut()
61-
.set_enable_proc_attr_macros(self.config.expand_proc_attr_macros());
58+
if self.analysis_host.raw_database().enable_proc_attr_macros()
59+
!= self.config.expand_proc_attr_macros()
60+
{
61+
self.analysis_host
62+
.raw_database_mut()
63+
.set_enable_proc_attr_macros(self.config.expand_proc_attr_macros());
64+
}
6265
}
6366

6467
pub(crate) fn current_status(&self) -> lsp_ext::ServerStatusParams {

0 commit comments

Comments
 (0)