diff options
author | Jonas Schievink <[email protected]> | 2021-06-03 15:11:20 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-06-03 17:09:21 +0100 |
commit | 9fdb8f90376c02ec2a267cf9eb3bdb7b6027e1e6 (patch) | |
tree | b816f97fd66df5bb827d7e2456b6a492a7199d34 /crates/rust-analyzer/src/reload.rs | |
parent | e5a2c6596ddd11b0d57042224ac7c1d7691ec33b (diff) |
Make it opt-in
Diffstat (limited to 'crates/rust-analyzer/src/reload.rs')
-rw-r--r-- | crates/rust-analyzer/src/reload.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs index 93b5ff55f..bd31d1d13 100644 --- a/crates/rust-analyzer/src/reload.rs +++ b/crates/rust-analyzer/src/reload.rs | |||
@@ -2,6 +2,7 @@ | |||
2 | use std::{mem, sync::Arc}; | 2 | use std::{mem, sync::Arc}; |
3 | 3 | ||
4 | use flycheck::{FlycheckConfig, FlycheckHandle}; | 4 | use flycheck::{FlycheckConfig, FlycheckHandle}; |
5 | use hir::db::DefDatabase; | ||
5 | use ide::Change; | 6 | use ide::Change; |
6 | use ide_db::base_db::{CrateGraph, SourceRoot, VfsPath}; | 7 | use ide_db::base_db::{CrateGraph, SourceRoot, VfsPath}; |
7 | use project_model::{BuildDataCollector, BuildDataResult, ProcMacroClient, ProjectWorkspace}; | 8 | use project_model::{BuildDataCollector, BuildDataResult, ProcMacroClient, ProjectWorkspace}; |
@@ -47,6 +48,11 @@ impl GlobalState { | |||
47 | } else if self.config.flycheck() != old_config.flycheck() { | 48 | } else if self.config.flycheck() != old_config.flycheck() { |
48 | self.reload_flycheck(); | 49 | self.reload_flycheck(); |
49 | } | 50 | } |
51 | |||
52 | // Apply experimental feature flags. | ||
53 | self.analysis_host | ||
54 | .raw_database_mut() | ||
55 | .set_enable_proc_attr_macros(self.config.expand_proc_attr_macros()); | ||
50 | } | 56 | } |
51 | pub(crate) fn maybe_refresh(&mut self, changes: &[(AbsPathBuf, ChangeKind)]) { | 57 | pub(crate) fn maybe_refresh(&mut self, changes: &[(AbsPathBuf, ChangeKind)]) { |
52 | if !changes.iter().any(|(path, kind)| is_interesting(path, *kind)) { | 58 | if !changes.iter().any(|(path, kind)| is_interesting(path, *kind)) { |