Skip to content

Commit

Permalink
Auto merge of rust-lang#12171 - lnicola:proc-macros-dont-invalidate-s…
Browse files Browse the repository at this point in the history
…tate, 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.
  • Loading branch information
bors committed May 6, 2022
2 parents 616796a + 97cdf3e commit db1434b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions crates/rust-analyzer/src/reload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,13 @@ impl GlobalState {
self.reload_flycheck();
}

// Apply experimental feature flags.
self.analysis_host
.raw_database_mut()
.set_enable_proc_attr_macros(self.config.expand_proc_attr_macros());
if self.analysis_host.raw_database().enable_proc_attr_macros()
!= self.config.expand_proc_attr_macros()
{
self.analysis_host
.raw_database_mut()
.set_enable_proc_attr_macros(self.config.expand_proc_attr_macros());
}
}

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

0 comments on commit db1434b

Please sign in to comment.