@@ -49,7 +49,7 @@ system:
4949* ` TERM ` — If this is set to ` dumb ` , it disables the progress bar.
5050* ` BROWSER ` — The web browser to execute to open documentation with [ `cargo
5151 doc` ]'s' ` --open` flag.
52- * ` RUSTFMT ` — Instead of running ` rustfmt ` ,
52+ * ` RUSTFMT ` — Instead of running ` rustfmt ` ,
5353 [ ` cargo fmt ` ] ( https://github.com/rust-lang/rustfmt ) will execute this specified
5454 ` rustfmt ` instance instead.
5555
@@ -206,6 +206,12 @@ let version = env!("CARGO_PKG_VERSION");
206206 example, ` CARGO_BIN_EXE_my-program ` for a binary named ` my-program ` .
207207 Binaries are automatically built when the test is built, unless the binary
208208 has required features that are not enabled.
209+ * ` CARGO_PRIMARY_PACKAGE ` — This environment variable will be set if the
210+ package being built is primary. Primary packages are the ones the user
211+ selected on the command-line, either with ` -p ` flags or the defaults based
212+ on the current directory and the default workspace members. This environment
213+ variable will not be set when building dependencies. This is only set when
214+ compiling the package (not when running binaries or tests).
209215
210216[ integration test ] : cargo-targets.md#integration-tests
211217[ `env` macro ] : ../../std/macro.env.html
@@ -266,12 +272,6 @@ let out_dir = env::var("OUT_DIR").unwrap();
266272 Currently Cargo doesn't set the ` MAKEFLAGS ` variable,
267273 but it's free for build scripts invoking GNU Make
268274 to set it to the contents of ` CARGO_MAKEFLAGS ` .
269- * ` CARGO_PRIMARY_PACKAGE ` — This environment variable will be set if the package being
270- built is primary. Primary packages are the ones the user
271- selected on the command-line, either with ` -p ` flags or
272- the defaults based on the current directory and the default
273- workspace members.
274- This environment variable will not be set when building dependencies.
275275* ` CARGO_FEATURE_<name> ` — For each activated feature of the package being
276276 built, this environment variable will be present
277277 where ` <name> ` is the name of the feature uppercased
0 commit comments