aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-06-21 14:41:27 +0100
committerGitHub <[email protected]>2021-06-21 14:41:27 +0100
commitb48aba009025701c4adb45e2042f0bcdb9d949a7 (patch)
tree9c311ee5e9058a3db66134368c8b84c30ed94f81 /docs
parent4402f2b280f58896ed0696f4243d88a58fd970ca (diff)
parent8b77e2692cd97552b1b8d66eb51cec69695b3a5b (diff)
Merge #9227
9227: Add a config setting to disable the 'test' cfg in specified crates r=matklad a=lf- If you are opening libcore from rust-lang/rust as opposed to e.g. goto definition from some other crate which would use the sysroot instance of libcore, a `#![cfg(not(test))]` would previously have made all the code excluded from the module tree, breaking the editor experience. Core does not need to ever be edited with `#[cfg(test)]` enabled, as the tests are in another crate. This PR puts in a slight hack that checks for the crate name "core" and turns off `#[cfg(test)]` for that crate. Fixes #9203 Fixes #9226 Co-authored-by: Jade <[email protected]>
Diffstat (limited to 'docs')
-rw-r--r--docs/user/generated_config.adoc5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc
index 18ea77266..58cb46974 100644
--- a/docs/user/generated_config.adoc
+++ b/docs/user/generated_config.adoc
@@ -39,6 +39,11 @@ Automatically refresh project info via `cargo metadata` on
39-- 39--
40Activate all available features (`--all-features`). 40Activate all available features (`--all-features`).
41-- 41--
42[[rust-analyzer.cargo.unsetTest]]rust-analyzer.cargo.unsetTest (default: `["core"]`)::
43+
44--
45Unsets `#[cfg(test)]` for the specified crates.
46--
42[[rust-analyzer.cargo.features]]rust-analyzer.cargo.features (default: `[]`):: 47[[rust-analyzer.cargo.features]]rust-analyzer.cargo.features (default: `[]`)::
43+ 48+
44-- 49--