diff options
author | Paul Daniel Faria <[email protected]> | 2020-06-07 15:29:03 +0100 |
---|---|---|
committer | Paul Daniel Faria <[email protected]> | 2020-06-07 15:29:03 +0100 |
commit | 3937b225e7918ae6d75849a0959754af43fbf08c (patch) | |
tree | edcf3d514f87a8772fa5c97aae2a58e5ddcb7b35 /crates/rust-analyzer | |
parent | dc340f12a39e7cd8b495b84c009052c4d441d867 (diff) |
Change management of test cfg to better support json projects
Diffstat (limited to 'crates/rust-analyzer')
-rw-r--r-- | crates/rust-analyzer/src/cli/load_cargo.rs | 1 | ||||
-rw-r--r-- | crates/rust-analyzer/src/global_state.rs | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/crates/rust-analyzer/src/cli/load_cargo.rs b/crates/rust-analyzer/src/cli/load_cargo.rs index c7e86fe0c..46181b677 100644 --- a/crates/rust-analyzer/src/cli/load_cargo.rs +++ b/crates/rust-analyzer/src/cli/load_cargo.rs | |||
@@ -151,7 +151,6 @@ pub(crate) fn load( | |||
151 | // FIXME: cfg options? | 151 | // FIXME: cfg options? |
152 | let default_cfg_options = { | 152 | let default_cfg_options = { |
153 | let mut opts = get_rustc_cfg_options(None); | 153 | let mut opts = get_rustc_cfg_options(None); |
154 | opts.insert_atom("test".into()); | ||
155 | opts.insert_atom("debug_assertion".into()); | 154 | opts.insert_atom("debug_assertion".into()); |
156 | opts | 155 | opts |
157 | }; | 156 | }; |
diff --git a/crates/rust-analyzer/src/global_state.rs b/crates/rust-analyzer/src/global_state.rs index 0bebb5bf6..4d871aa34 100644 --- a/crates/rust-analyzer/src/global_state.rs +++ b/crates/rust-analyzer/src/global_state.rs | |||
@@ -138,7 +138,6 @@ impl GlobalState { | |||
138 | // FIXME: Read default cfgs from config | 138 | // FIXME: Read default cfgs from config |
139 | let default_cfg_options = { | 139 | let default_cfg_options = { |
140 | let mut opts = get_rustc_cfg_options(config.cargo.target.as_ref()); | 140 | let mut opts = get_rustc_cfg_options(config.cargo.target.as_ref()); |
141 | opts.insert_atom("test".into()); | ||
142 | opts.insert_atom("debug_assertion".into()); | 141 | opts.insert_atom("debug_assertion".into()); |
143 | opts | 142 | opts |
144 | }; | 143 | }; |