aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/tests/heavy_tests
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-10-05 15:25:59 +0100
committerGitHub <[email protected]>2019-10-05 15:25:59 +0100
commitae6305b90c80eb919cfde985cba66975b6222ed2 (patch)
treede601daf3714c4bda937e7cad05d048b69d16e71 /crates/ra_lsp_server/tests/heavy_tests
parentdbf869b4d2dac09df17609edf6e67c1611b71dc5 (diff)
parentc6303d9fee98232ac83a77f943c39d65c9c6b6db (diff)
Merge #1928
1928: Support `#[cfg(..)]` r=matklad a=oxalica This PR implement `#[cfg(..)]` conditional compilation. It read default cfg options from `rustc --print cfg` with also hard-coded `test` and `debug_assertion` enabled. Front-end settings are **not** included in this PR. There is also a known issue that inner control attributes are totally ignored. I think it is **not** a part of `cfg` and create a separated issue for it. #1949 Fixes #1920 Related: #1073 Co-authored-by: uHOOCCOOHu <[email protected]> Co-authored-by: oxalica <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server/tests/heavy_tests')
-rw-r--r--crates/ra_lsp_server/tests/heavy_tests/main.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/ra_lsp_server/tests/heavy_tests/main.rs b/crates/ra_lsp_server/tests/heavy_tests/main.rs
index 152681062..2ba82ab05 100644
--- a/crates/ra_lsp_server/tests/heavy_tests/main.rs
+++ b/crates/ra_lsp_server/tests/heavy_tests/main.rs
@@ -286,7 +286,13 @@ fn test_missing_module_code_action_in_json_project() {
286 286
287 let project = json!({ 287 let project = json!({
288 "roots": [path], 288 "roots": [path],
289 "crates": [ { "root_module": path.join("src/lib.rs"), "deps": [], "edition": "2015" } ] 289 "crates": [ {
290 "root_module": path.join("src/lib.rs"),
291 "deps": [],
292 "edition": "2015",
293 "atom_cfgs": [],
294 "key_value_cfgs": {}
295 } ]
290 }); 296 });
291 297
292 let code = format!( 298 let code = format!(