Skip to content

Commit ed31dad

Browse files
authored
docs(unstable): Move -Zwarnings from stable to unstable section (#14827)
### What does this PR try to resolve? Found this when working on another PR ### How should we test and review this PR? ### Additional information
2 parents e858736 + 3340ee9 commit ed31dad

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

src/doc/src/reference/unstable.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,6 +1746,24 @@ When in doubt, you can discuss this in [#14520](https://github.com/rust-lang/car
17461746
- powershell:
17471747
Add `CARGO_COMPLETE=powershell cargo +nightly | Invoke-Expression` to `$PROFILE`.
17481748

1749+
## warnings
1750+
1751+
The `-Z warnings` feature enables the `build.warnings` configuration option to control how
1752+
Cargo handles warnings. If the `-Z warnings` unstable flag is not enabled, then
1753+
the `build.warnings` config will be ignored.
1754+
1755+
This setting currently only applies to rustc warnings. It may apply to additional warnings (such as Cargo lints or Cargo warnings)
1756+
in the future.
1757+
1758+
### `build.warnings`
1759+
* Type: string
1760+
* Default: `warn`
1761+
* Environment: `CARGO_BUILD_WARNINGS`
1762+
1763+
Controls how Cargo handles warnings. Allowed values are:
1764+
* `warn`: warnings are emitted as warnings (default).
1765+
* `allow`: warnings are hidden.
1766+
* `deny`: if warnings are emitted, an error will be raised at the end of the operation and the process will exit with a failure exit code.
17491767
# Stabilized and removed features
17501768

17511769
## Compile progress
@@ -1992,22 +2010,3 @@ default behavior.
19922010

19932011
See the [build script documentation](build-scripts.md#rustc-check-cfg) for information
19942012
about specifying custom cfgs.
1995-
1996-
## warnings
1997-
1998-
The `-Z warnings` feature enables the `build.warnings` configuration option to control how
1999-
Cargo handles warnings. If the `-Z warnings` unstable flag is not enabled, then
2000-
the `build.warnings` config will be ignored.
2001-
2002-
This setting currently only applies to rustc warnings. It may apply to additional warnings (such as Cargo lints or Cargo warnings)
2003-
in the future.
2004-
2005-
### `build.warnings`
2006-
* Type: string
2007-
* Default: `warn`
2008-
* Environment: `CARGO_BUILD_WARNINGS`
2009-
2010-
Controls how Cargo handles warnings. Allowed values are:
2011-
* `warn`: warnings are emitted as warnings (default).
2012-
* `allow`: warnings are hidden.
2013-
* `deny`: if warnings are emitted, an error will be raised at the end of the operation and the process will exit with a failure exit code.

0 commit comments

Comments
 (0)