diff --git a/src/doc/src/reference/environment-variables.md b/src/doc/src/reference/environment-variables.md index 415e6891890..5dafb7bcb3a 100644 --- a/src/doc/src/reference/environment-variables.md +++ b/src/doc/src/reference/environment-variables.md @@ -260,9 +260,10 @@ corresponding environment variable is set to the empty string, `""`. * `CARGO_PRIMARY_PACKAGE` --- This environment variable will be set if the package being built is primary. Primary packages are the ones the user selected on the command-line, either with `-p` flags or the defaults based - on the current directory and the default workspace members. This environment - variable will not be set when building dependencies. This is only set when - compiling the package (not when running binaries or tests). + on the current directory and the default workspace members. + This variable will not be set when building dependencies, + unless a dependency is also a workspace member that was also selected on the command-line. + This is only set when compiling the package (not when running binaries or tests). * `CARGO_TARGET_TMPDIR` --- Only set when building [integration test] or benchmark code. This is a path to a directory inside the target directory where integration tests or benchmarks are free to put any data needed by @@ -355,6 +356,9 @@ let out_dir = env::var("OUT_DIR").unwrap(); * `CARGO_CFG_TARGET_FEATURE=mmx,sse` --- List of CPU [target features] enabled. > Note that different [target triples][Target Triple] have different sets of `cfg` values, > hence variables present in one target triple might not be available in the other. + > + > Some cfg values like `debug_assertions`, `test`, and Cargo features like + > `feature="foo"` are not available. * `OUT_DIR` --- the folder in which all output and intermediate artifacts should be placed. This folder is inside the build directory for the package being built, and it is unique for the package in question.