Skip to content

Commit 614aefb

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

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

crates/rust-analyzer/src/reload.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,13 @@ impl GlobalState {
5656
}
5757

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

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

0 commit comments

Comments
 (0)