Skip to content

Commit

Permalink
docs(unstable): Move -Zwarnings from stable to unstable section (#14827)
Browse files Browse the repository at this point in the history
### What does this PR try to resolve?

Found this when working on another PR

### How should we test and review this PR?

### Additional information
  • Loading branch information
epage authored Nov 15, 2024
2 parents e858736 + 3340ee9 commit ed31dad
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions src/doc/src/reference/unstable.md
Original file line number Diff line number Diff line change
Expand Up @@ -1746,6 +1746,24 @@ When in doubt, you can discuss this in [#14520](https://github.com/rust-lang/car
- powershell:
Add `CARGO_COMPLETE=powershell cargo +nightly | Invoke-Expression` to `$PROFILE`.

## warnings

The `-Z warnings` feature enables the `build.warnings` configuration option to control how
Cargo handles warnings. If the `-Z warnings` unstable flag is not enabled, then
the `build.warnings` config will be ignored.

This setting currently only applies to rustc warnings. It may apply to additional warnings (such as Cargo lints or Cargo warnings)
in the future.

### `build.warnings`
* Type: string
* Default: `warn`
* Environment: `CARGO_BUILD_WARNINGS`

Controls how Cargo handles warnings. Allowed values are:
* `warn`: warnings are emitted as warnings (default).
* `allow`: warnings are hidden.
* `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.
# Stabilized and removed features

## Compile progress
Expand Down Expand Up @@ -1992,22 +2010,3 @@ default behavior.

See the [build script documentation](build-scripts.md#rustc-check-cfg) for information
about specifying custom cfgs.

## warnings

The `-Z warnings` feature enables the `build.warnings` configuration option to control how
Cargo handles warnings. If the `-Z warnings` unstable flag is not enabled, then
the `build.warnings` config will be ignored.

This setting currently only applies to rustc warnings. It may apply to additional warnings (such as Cargo lints or Cargo warnings)
in the future.

### `build.warnings`
* Type: string
* Default: `warn`
* Environment: `CARGO_BUILD_WARNINGS`

Controls how Cargo handles warnings. Allowed values are:
* `warn`: warnings are emitted as warnings (default).
* `allow`: warnings are hidden.
* `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 comments on commit ed31dad

Please sign in to comment.