Skip to content

Commit db1434b

Browse files
committed
Auto merge of rust-lang#12171 - lnicola:proc-macros-dont-invalidate-state, r=Veykril
fix: Try not to invalidate state when the proc macro preference didn't change This appears to fix rust-lang#12027, but I'm not sure.
2 parents 616796a + 97cdf3e commit db1434b

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)