Rollup merge of #123501 - Urgau:stabilize-check-cfg, r=petrochenkov

Stabilize checking of cfgs at compile-time: `--check-cfg` option

This PR stabilize the `--check-cfg` CLI option of `rustc` (and `rustdoc`) 🎉.

In particular this PR does two things:
  1. it makes the `--check-cfg` option stable
  2. and it moves the documentation to the stable books

FCP: https://github.com/rust-lang/rust/issues/82450#issuecomment-1965328542

Resolves #82450

``@rustbot`` labels +S-blocked +F-check-cfg
r? ``@petrochenkov``
This commit is contained in:
Matthias Krüger 2024-04-16 17:54:41 +02:00 committed by GitHub
commit f54219c473
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
78 changed files with 197 additions and 229 deletions

View file

@ -168,7 +168,7 @@ pub(super) fn unexpected_cfg_name(
diag.note("see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration");
} else {
diag.help(format!("to expect this configuration use `--check-cfg={inst}`"));
diag.note("see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration");
diag.note("see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration");
}
}
@ -272,6 +272,6 @@ pub(super) fn unexpected_cfg_value(
if !is_cfg_a_well_know_name {
diag.help(format!("to expect this configuration use `--check-cfg={inst}`"));
}
diag.note("see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration");
diag.note("see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration");
}
}

View file

@ -1373,7 +1373,7 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
opt::flag_s("h", "help", "Display this message"),
opt::multi_s("", "cfg", "Configure the compilation environment.
SPEC supports the syntax `NAME[=\"VALUE\"]`.", "SPEC"),
opt::multi("", "check-cfg", "Provide list of valid cfg options for checking", "SPEC"),
opt::multi_s("", "check-cfg", "Provide list of expected cfgs for checking", "SPEC"),
opt::multi_s(
"L",
"",

View file

@ -257,7 +257,7 @@ macro_rules! ins {
// `tests/ui/check-cfg/well-known-values.rs` (in order to test the
// expected values of the new config) and bless the all directory.
//
// Don't forget to update `src/doc/unstable-book/src/compiler-flags/check-cfg.md`
// Don't forget to update `src/doc/rustc/src/check-cfg.md`
// in the unstable book as well!
ins!(sym::debug_assertions, no_values);

View file

@ -77,6 +77,7 @@
- [Profile-guided Optimization](profile-guided-optimization.md)
- [Instrumentation-based Code Coverage](instrument-coverage.md)
- [Linker-plugin-based LTO](linker-plugin-lto.md)
- [Checking conditional configurations](check-cfg.md)
- [Exploit Mitigations](exploit-mitigations.md)
- [Symbol Mangling](symbol-mangling/index.md)
- [v0 Symbol Format](symbol-mangling/v0.md)

View file

@ -1,10 +1,4 @@
# `check-cfg`
The tracking issue for this feature is: [#82450](https://github.com/rust-lang/rust/issues/82450).
------------------------
This feature enables checking of conditional configuration.
# Checking conditional configurations
`rustc` accepts the `--check-cfg` option, which specifies whether to check conditions and how to
check them. The `--check-cfg` option takes a value, called the _check cfg specification_.

View file

@ -18,6 +18,16 @@ The value can either be a single identifier or two identifiers separated by `=`.
For examples, `--cfg 'verbose'` or `--cfg 'feature="serde"'`. These correspond
to `#[cfg(verbose)]` and `#[cfg(feature = "serde")]` respectively.
<a id="option-check-cfg"></a>
## `--check-cfg`: enables checking conditional configurations
This flag will enable checking conditional configurations.
Refer to the [Checking conditional configurations](check-cfg.md) of this book
for further details and explanation.
For examples, `--check-cfg 'cfg(verbose)'` or `--check-cfg 'cfg(feature, values("serde"))'`.
These correspond to `#[cfg(verbose)]` and `#[cfg(feature = "serde")]` respectively.
<a id="option-l-search-path"></a>
## `-L`: add a directory to the library search path

View file

@ -131,6 +131,20 @@ This flag accepts the same values as `rustc --cfg`, and uses it to configure
compilation. The example above uses `feature`, but any of the `cfg` values
are acceptable.
## `--check-cfg`: check configuration flags
This flag accepts the same values as `rustc --check-cfg`, and uses it to
check configuration flags.
Using this flag looks like this:
```bash
$ rustdoc src/lib.rs --check-cfg='cfg(my_cfg, values("foo", "bar"))'
```
The example above check every well known names and values (`target_os`, `doc`, `test`, ...)
and check the values of `my_cfg`: `foo` and `bar`.
## `--extern`: specify a dependency's location
Using this flag looks like this:

View file

@ -618,22 +618,6 @@ crate being documented (`foobar`) and a path to output the calls
To scrape examples from test code, e.g. functions marked `#[test]`, then
add the `--scrape-tests` flag.
### `--check-cfg`: check configuration flags
* Tracking issue: [#82450](https://github.com/rust-lang/rust/issues/82450)
This flag accepts the same values as `rustc --check-cfg`, and uses it to check configuration flags.
Using this flag looks like this:
```bash
$ rustdoc src/lib.rs -Z unstable-options \
--check-cfg='cfg(feature, values("foo", "bar"))'
```
The example above check every well known names and values (`target_os`, `doc`, `test`, ...)
and check the values of `feature`: `foo` and `bar`.
### `--generate-link-to-definition`: Generate links on types in source code
* Tracking issue: [#89095](https://github.com/rust-lang/rust/issues/89095)

View file

@ -60,11 +60,8 @@ pub(crate) fn generate_args_file(file_path: &Path, options: &RustdocOptions) ->
for cfg in &options.cfgs {
content.push(format!("--cfg={cfg}"));
}
if !options.check_cfgs.is_empty() {
content.push("-Zunstable-options".to_string());
for check_cfg in &options.check_cfgs {
content.push(format!("--check-cfg={check_cfg}"));
}
for check_cfg in &options.check_cfgs {
content.push(format!("--check-cfg={check_cfg}"));
}
for lib_str in &options.lib_strs {

View file

@ -242,7 +242,7 @@ fn opts() -> Vec<RustcOptGroup> {
o.optmulti("L", "library-path", "directory to add to crate search path", "DIR")
}),
stable("cfg", |o| o.optmulti("", "cfg", "pass a --cfg to rustc", "")),
unstable("check-cfg", |o| o.optmulti("", "check-cfg", "pass a --check-cfg to rustc", "")),
stable("check-cfg", |o| o.optmulti("", "check-cfg", "pass a --check-cfg to rustc", "")),
stable("extern", |o| o.optmulti("", "extern", "pass an --extern to rustc", "NAME[=PATH]")),
unstable("extern-html-root-url", |o| {
o.optmulti(

View file

@ -1,5 +1,5 @@
//@ check-pass
//@ compile-flags: --check-cfg=cfg() -Z unstable-options
//@ compile-flags: --check-cfg=cfg()
/// uniz is nor a builtin nor pass as arguments so is unexpected
#[cfg(uniz)]

View file

@ -5,7 +5,7 @@ LL | #[cfg(uniz)]
| ^^^^ help: there is a config with a similar name: `unix`
|
= help: to expect this configuration use `--check-cfg=cfg(uniz)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View file

@ -1,11 +0,0 @@
warning: unexpected `cfg` condition value
--> $DIR/check-cfg-test.rs:9:7
|
LL | #[cfg(feature = "invalid")]
| ^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `feature` are: test
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View file

@ -1,2 +0,0 @@
//@ check-fail
//@ compile-flags: --check-cfg=cfg()

View file

@ -1,2 +0,0 @@
error: the `-Z unstable-options` flag must also be passed to enable the flag `check-cfg`

View file

@ -6,7 +6,7 @@ LL | #[cfg(feature = "invalid")]
|
= note: expected values for `feature` are: `test`
= help: to expect this configuration use `--check-cfg=cfg(feature, values("invalid"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View file

@ -1,7 +1,7 @@
// This test check that #![allow(unexpected_cfgs)] works with --cfg
//
//@ check-pass
//@ compile-flags: --cfg=unexpected --check-cfg=cfg() -Z unstable-options
//@ compile-flags: --cfg=unexpected --check-cfg=cfg()
#![allow(unexpected_cfgs)]

View file

@ -1,7 +1,7 @@
// This test check that local #[allow(unexpected_cfgs)] works
//
//@ check-pass
//@ compile-flags: --check-cfg=cfg() -Z unstable-options
//@ compile-flags: --check-cfg=cfg()
#[allow(unexpected_cfgs)]
fn foo() {

View file

@ -1,7 +1,7 @@
// This test check that #[allow(unexpected_cfgs)] doesn't work if put on the same level
//
//@ check-pass
//@ compile-flags: --check-cfg=cfg() -Z unstable-options
//@ compile-flags: --check-cfg=cfg()
#[allow(unexpected_cfgs)]
#[cfg(FALSE)]

View file

@ -6,7 +6,7 @@ LL | #[cfg(FALSE)]
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
= help: to expect this configuration use `--check-cfg=cfg(FALSE)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View file

@ -1,7 +1,7 @@
// This test check that a top-level #![allow(unexpected_cfgs)] works
//
//@ check-pass
//@ compile-flags: --check-cfg=cfg() -Z unstable-options
//@ compile-flags: --check-cfg=cfg()
#![allow(unexpected_cfgs)]

View file

@ -1,7 +1,7 @@
// This test check that #[allow(unexpected_cfgs)] work if put on an upper level
//
//@ check-pass
//@ compile-flags: --check-cfg=cfg() -Z unstable-options
//@ compile-flags: --check-cfg=cfg()
#[allow(unexpected_cfgs)]
mod aa {

View file

@ -1,5 +1,5 @@
warning: unexpected `cfg` condition value: `serde`
--> $DIR/cargo-feature.rs:14:7
--> $DIR/cargo-feature.rs:13:7
|
LL | #[cfg(feature = "serde")]
| ^^^^^^^^^^^^^^^^^ help: remove the condition
@ -10,7 +10,7 @@ LL | #[cfg(feature = "serde")]
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: (none)
--> $DIR/cargo-feature.rs:18:7
--> $DIR/cargo-feature.rs:17:7
|
LL | #[cfg(feature)]
| ^^^^^^^ help: remove the condition
@ -20,7 +20,7 @@ LL | #[cfg(feature)]
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `tokio_unstable`
--> $DIR/cargo-feature.rs:22:7
--> $DIR/cargo-feature.rs:21:7
|
LL | #[cfg(tokio_unstable)]
| ^^^^^^^^^^^^^^
@ -30,7 +30,7 @@ LL | #[cfg(tokio_unstable)]
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `CONFIG_NVME`
--> $DIR/cargo-feature.rs:26:7
--> $DIR/cargo-feature.rs:25:7
|
LL | #[cfg(CONFIG_NVME = "m")]
| ^^^^^^^^^^^^^^^^^

View file

@ -5,7 +5,6 @@
//@ check-pass
//@ revisions: some none
//@ rustc-env:CARGO_CRATE_NAME=foo
//@ compile-flags: -Z unstable-options
//@ [none]compile-flags: --check-cfg=cfg(feature,values())
//@ [some]compile-flags: --check-cfg=cfg(feature,values("bitcode"))
//@ [some]compile-flags: --check-cfg=cfg(CONFIG_NVME,values("y"))

View file

@ -1,5 +1,5 @@
warning: unexpected `cfg` condition value: `serde`
--> $DIR/cargo-feature.rs:14:7
--> $DIR/cargo-feature.rs:13:7
|
LL | #[cfg(feature = "serde")]
| ^^^^^^^^^^^^^^^^^
@ -10,7 +10,7 @@ LL | #[cfg(feature = "serde")]
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: (none)
--> $DIR/cargo-feature.rs:18:7
--> $DIR/cargo-feature.rs:17:7
|
LL | #[cfg(feature)]
| ^^^^^^^- help: specify a config value: `= "bitcode"`
@ -20,7 +20,7 @@ LL | #[cfg(feature)]
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `tokio_unstable`
--> $DIR/cargo-feature.rs:22:7
--> $DIR/cargo-feature.rs:21:7
|
LL | #[cfg(tokio_unstable)]
| ^^^^^^^^^^^^^^
@ -30,7 +30,7 @@ LL | #[cfg(tokio_unstable)]
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `m`
--> $DIR/cargo-feature.rs:26:7
--> $DIR/cargo-feature.rs:25:7
|
LL | #[cfg(CONFIG_NVME = "m")]
| ^^^^^^^^^^^^^^---

View file

@ -2,7 +2,6 @@
// This test checks we won't suggest more than 3 span suggestions for cfg names
//
//@ check-pass
//@ compile-flags: -Z unstable-options
//@ compile-flags: --check-cfg=cfg(foo,values("value")) --check-cfg=cfg(bar,values("value")) --check-cfg=cfg(bee,values("value")) --check-cfg=cfg(cow,values("value"))
#[cfg(value)]

View file

@ -1,12 +1,12 @@
warning: unexpected `cfg` condition name: `value`
--> $DIR/cfg-value-for-cfg-name-duplicate.rs:8:7
--> $DIR/cfg-value-for-cfg-name-duplicate.rs:7:7
|
LL | #[cfg(value)]
| ^^^^^
|
= help: expected names are: `bar`, `bee`, `clippy`, `cow`, `debug_assertions`, `doc`, `doctest`, `foo`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
= help: to expect this configuration use `--check-cfg=cfg(value)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View file

@ -2,7 +2,6 @@
// This test checks that when a single cfg has a value for user's specified name
//
//@ check-pass
//@ compile-flags: -Z unstable-options
//@ compile-flags: --check-cfg=cfg(foo,values("my_value")) --check-cfg=cfg(bar,values("my_value"))
#[cfg(my_value)]

View file

@ -1,12 +1,12 @@
warning: unexpected `cfg` condition name: `my_value`
--> $DIR/cfg-value-for-cfg-name-multiple.rs:8:7
--> $DIR/cfg-value-for-cfg-name-multiple.rs:7:7
|
LL | #[cfg(my_value)]
| ^^^^^^^^
|
= help: expected names are: `bar`, `clippy`, `debug_assertions`, `doc`, `doctest`, `foo`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
= help: to expect this configuration use `--check-cfg=cfg(my_value)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
help: found config with similar value
|

View file

@ -3,7 +3,6 @@
// suggest to use `#[cfg(target_os = "linux")]` instead of `#[cfg(linux)]`
//
//@ check-pass
//@ compile-flags: -Z unstable-options
//@ compile-flags: --check-cfg=cfg()
#[cfg(linux)]

View file

@ -1,22 +1,22 @@
warning: unexpected `cfg` condition name: `linux`
--> $DIR/cfg-value-for-cfg-name.rs:9:7
--> $DIR/cfg-value-for-cfg-name.rs:8:7
|
LL | #[cfg(linux)]
| ^^^^^ help: found config with similar value: `target_os = "linux"`
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
= help: to expect this configuration use `--check-cfg=cfg(linux)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition name: `linux`
--> $DIR/cfg-value-for-cfg-name.rs:14:7
--> $DIR/cfg-value-for-cfg-name.rs:13:7
|
LL | #[cfg(linux = "os-name")]
| ^^^^^^^^^^^^^^^^^
|
= help: to expect this configuration use `--check-cfg=cfg(linux, values("os-name"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: 2 warnings emitted

View file

@ -1,7 +1,7 @@
// This test check that we correctly emit an warning for compact cfg
//
//@ check-pass
//@ compile-flags: --check-cfg=cfg() -Z unstable-options
//@ compile-flags: --check-cfg=cfg()
#![feature(cfg_target_compact)]

View file

@ -6,7 +6,7 @@ LL | #[cfg(target(os = "linux", architecture = "arm"))]
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
= help: to expect this configuration use `--check-cfg=cfg(target_architecture, values("arm"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View file

@ -1,7 +1,7 @@
// This test check that we correctly emit an warning for compact cfg
//
//@ check-pass
//@ compile-flags: --check-cfg=cfg() -Z unstable-options
//@ compile-flags: --check-cfg=cfg()
#![feature(cfg_target_compact)]

View file

@ -5,7 +5,7 @@ LL | #[cfg(target(os = "linux", pointer_width = "X"))]
| ^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_pointer_width` are: `16`, `32`, `64`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View file

@ -1,5 +1,4 @@
//@ check-pass
//@ compile-flags: -Z unstable-options
//@ compile-flags: --check-cfg=cfg(my_cfg,values("foo")) --check-cfg=cfg(my_cfg,values("bar"))
//@ compile-flags: --check-cfg=cfg(my_cfg,values())

View file

@ -1,23 +1,23 @@
warning: unexpected `cfg` condition value: (none)
--> $DIR/concat-values.rs:6:7
--> $DIR/concat-values.rs:5:7
|
LL | #[cfg(my_cfg)]
| ^^^^^^
|
= note: expected values for `my_cfg` are: `bar`, `foo`
= help: to expect this configuration use `--check-cfg=cfg(my_cfg)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `unk`
--> $DIR/concat-values.rs:10:7
--> $DIR/concat-values.rs:9:7
|
LL | #[cfg(my_cfg = "unk")]
| ^^^^^^^^^^^^^^
|
= note: expected values for `my_cfg` are: `bar`, `foo`
= help: to expect this configuration use `--check-cfg=cfg(my_cfg, values("unk"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: 2 warnings emitted

View file

@ -2,7 +2,7 @@
//@ revisions: cargo rustc
//@ [rustc]unset-rustc-env:CARGO_CRATE_NAME
//@ [cargo]rustc-env:CARGO_CRATE_NAME=foo
//@ compile-flags: --check-cfg=cfg(feature,values("foo")) --check-cfg=cfg(no_values) -Z unstable-options
//@ compile-flags: --check-cfg=cfg(feature,values("foo")) --check-cfg=cfg(no_values)
#[cfg(featur)]
//~^ WARNING unexpected `cfg` condition name

View file

@ -6,7 +6,7 @@ LL | #[cfg(featur)]
|
= help: expected values for `feature` are: `foo`
= help: to expect this configuration use `--check-cfg=cfg(featur)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition name: `featur`
@ -16,7 +16,7 @@ LL | #[cfg(featur = "foo")]
| ^^^^^^^^^^^^^^
|
= help: to expect this configuration use `--check-cfg=cfg(featur, values("foo"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
help: there is a config with a similar name and value
|
LL | #[cfg(feature = "foo")]
@ -30,7 +30,7 @@ LL | #[cfg(featur = "fo")]
|
= help: expected values for `feature` are: `foo`
= help: to expect this configuration use `--check-cfg=cfg(featur, values("fo"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
help: there is a config with a similar name and different values
|
LL | #[cfg(feature = "foo")]
@ -43,7 +43,7 @@ LL | #[cfg(no_value)]
| ^^^^^^^^ help: there is a config with a similar name: `no_values`
|
= help: to expect this configuration use `--check-cfg=cfg(no_value)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `no_value`
--> $DIR/diagnotics.rs:26:7
@ -52,7 +52,7 @@ LL | #[cfg(no_value = "foo")]
| ^^^^^^^^^^^^^^^^
|
= help: to expect this configuration use `--check-cfg=cfg(no_value, values("foo"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
help: there is a config with a similar name and no value
|
LL | #[cfg(no_values)]
@ -68,7 +68,7 @@ LL | #[cfg(no_values = "bar")]
|
= note: no expected value for `no_values`
= help: to expect this configuration use `--check-cfg=cfg(no_values, values("bar"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: 6 warnings emitted

View file

@ -1,7 +1,7 @@
// Check that we detect unexpected value when none are allowed
//
//@ check-pass
//@ compile-flags: --check-cfg=cfg(foo,values()) -Zunstable-options
//@ compile-flags: --check-cfg=cfg(foo,values())
#[cfg(foo = "foo")]
//~^ WARNING unexpected `cfg` condition value

View file

@ -6,7 +6,7 @@ LL | #[cfg(foo = "foo")]
|
= note: no expected values for `foo`
= help: to expect this configuration use `--check-cfg=cfg(foo, values("foo"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: (none)
@ -17,7 +17,7 @@ LL | #[cfg(foo)]
|
= note: no expected values for `foo`
= help: to expect this configuration use `--check-cfg=cfg(foo)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: 2 warnings emitted

View file

@ -1,16 +1,16 @@
warning: unexpected `cfg` condition name: `unknown_key`
--> $DIR/exhaustive-names-values.rs:10:7
--> $DIR/exhaustive-names-values.rs:9:7
|
LL | #[cfg(unknown_key = "value")]
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
= help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `value`
--> $DIR/exhaustive-names-values.rs:14:7
--> $DIR/exhaustive-names-values.rs:13:7
|
LL | #[cfg(test = "value")]
| ^^^^----------
@ -18,25 +18,25 @@ LL | #[cfg(test = "value")]
| help: remove the value
|
= note: no expected value for `test`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `feature`
--> $DIR/exhaustive-names-values.rs:18:7
--> $DIR/exhaustive-names-values.rs:17:7
|
LL | #[cfg(feature = "unk")]
| ^^^^^^^^^^^^^^^
|
= help: to expect this configuration use `--check-cfg=cfg(feature, values("unk"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `feature`
--> $DIR/exhaustive-names-values.rs:25:7
--> $DIR/exhaustive-names-values.rs:24:7
|
LL | #[cfg(feature = "std")]
| ^^^^^^^^^^^^^^^
|
= help: to expect this configuration use `--check-cfg=cfg(feature, values("std"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: 4 warnings emitted

View file

@ -1,16 +1,16 @@
warning: unexpected `cfg` condition name: `unknown_key`
--> $DIR/exhaustive-names-values.rs:10:7
--> $DIR/exhaustive-names-values.rs:9:7
|
LL | #[cfg(unknown_key = "value")]
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
= help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `value`
--> $DIR/exhaustive-names-values.rs:14:7
--> $DIR/exhaustive-names-values.rs:13:7
|
LL | #[cfg(test = "value")]
| ^^^^----------
@ -18,17 +18,17 @@ LL | #[cfg(test = "value")]
| help: remove the value
|
= note: no expected value for `test`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `unk`
--> $DIR/exhaustive-names-values.rs:18:7
--> $DIR/exhaustive-names-values.rs:17:7
|
LL | #[cfg(feature = "unk")]
| ^^^^^^^^^^^^^^^
|
= note: expected values for `feature` are: `std`
= help: to expect this configuration use `--check-cfg=cfg(feature, values("unk"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: 3 warnings emitted

View file

@ -1,16 +1,16 @@
warning: unexpected `cfg` condition name: `unknown_key`
--> $DIR/exhaustive-names-values.rs:10:7
--> $DIR/exhaustive-names-values.rs:9:7
|
LL | #[cfg(unknown_key = "value")]
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
= help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `value`
--> $DIR/exhaustive-names-values.rs:14:7
--> $DIR/exhaustive-names-values.rs:13:7
|
LL | #[cfg(test = "value")]
| ^^^^----------
@ -18,17 +18,17 @@ LL | #[cfg(test = "value")]
| help: remove the value
|
= note: no expected value for `test`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `unk`
--> $DIR/exhaustive-names-values.rs:18:7
--> $DIR/exhaustive-names-values.rs:17:7
|
LL | #[cfg(feature = "unk")]
| ^^^^^^^^^^^^^^^
|
= note: expected values for `feature` are: `std`
= help: to expect this configuration use `--check-cfg=cfg(feature, values("unk"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: 3 warnings emitted

View file

@ -2,7 +2,6 @@
//
//@ check-pass
//@ revisions: empty_cfg feature full
//@ compile-flags: -Z unstable-options
//@ [empty_cfg]compile-flags: --check-cfg=cfg()
//@ [feature]compile-flags: --check-cfg=cfg(feature,values("std"))
//@ [full]compile-flags: --check-cfg=cfg(feature,values("std")) --check-cfg=cfg()

View file

@ -1,7 +1,7 @@
// Check warning for unexpected cfg
//
//@ check-pass
//@ compile-flags: --check-cfg=cfg() -Z unstable-options
//@ compile-flags: --check-cfg=cfg()
#[cfg(unknown_key = "value")]
//~^ WARNING unexpected `cfg` condition name

View file

@ -6,7 +6,7 @@ LL | #[cfg(unknown_key = "value")]
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
= help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View file

@ -7,7 +7,7 @@ LL | #[cfg(test = "value")]
| help: remove the value
|
= note: no expected value for `test`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View file

@ -2,8 +2,8 @@
//
//@ check-pass
//@ revisions: empty_cfg without_names
//@ [empty_cfg]compile-flags: --check-cfg=cfg() -Z unstable-options
//@ [without_names]compile-flags: --check-cfg=cfg(any()) -Z unstable-options
//@ [empty_cfg]compile-flags: --check-cfg=cfg()
//@ [without_names]compile-flags: --check-cfg=cfg(any())
#[cfg(test = "value")]
//~^ WARNING unexpected `cfg` condition value

View file

@ -7,7 +7,7 @@ LL | #[cfg(test = "value")]
| help: remove the value
|
= note: no expected value for `test`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View file

@ -9,7 +9,6 @@
//@ revisions: mixed_values_any mixed_any any_values giberich unterminated
//@ revisions: none_not_empty cfg_none
//
//@ compile-flags: -Z unstable-options
//@ [anything_else]compile-flags: --check-cfg=anything_else(...)
//@ [string_for_name_1]compile-flags: --check-cfg=cfg("NOT_IDENT")
//@ [string_for_name_2]compile-flags: --check-cfg=cfg(foo,"NOT_IDENT",bar)

View file

@ -3,7 +3,7 @@
// we correctly lint on the `cfg!` macro and `cfg_attr` attribute.
//
//@ check-pass
//@ compile-flags: --cfg feature="bar" --cfg unknown_name -Z unstable-options
//@ compile-flags: --cfg feature="bar" --cfg unknown_name
//@ compile-flags: --check-cfg=cfg(feature,values("foo"))
#[cfg(windows)]

View file

@ -5,7 +5,7 @@ LL | #[cfg(widnows)]
| ^^^^^^^ help: there is a config with a similar name: `windows`
|
= help: to expect this configuration use `--check-cfg=cfg(widnows)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: (none)
@ -16,7 +16,7 @@ LL | #[cfg(feature)]
|
= note: expected values for `feature` are: `foo`
= help: to expect this configuration use `--check-cfg=cfg(feature)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `bar`
--> $DIR/mix.rs:23:7
@ -26,7 +26,7 @@ LL | #[cfg(feature = "bar")]
|
= note: expected values for `feature` are: `foo`
= help: to expect this configuration use `--check-cfg=cfg(feature, values("bar"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `zebra`
--> $DIR/mix.rs:27:7
@ -36,7 +36,7 @@ LL | #[cfg(feature = "zebra")]
|
= note: expected values for `feature` are: `foo`
= help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `uu`
--> $DIR/mix.rs:31:12
@ -46,7 +46,7 @@ LL | #[cfg_attr(uu, test)]
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
= help: to expect this configuration use `--check-cfg=cfg(uu)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `widnows`
--> $DIR/mix.rs:40:10
@ -55,7 +55,7 @@ LL | cfg!(widnows);
| ^^^^^^^ help: there is a config with a similar name: `windows`
|
= help: to expect this configuration use `--check-cfg=cfg(widnows)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `bar`
--> $DIR/mix.rs:43:10
@ -65,7 +65,7 @@ LL | cfg!(feature = "bar");
|
= note: expected values for `feature` are: `foo`
= help: to expect this configuration use `--check-cfg=cfg(feature, values("bar"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `zebra`
--> $DIR/mix.rs:45:10
@ -75,7 +75,7 @@ LL | cfg!(feature = "zebra");
|
= note: expected values for `feature` are: `foo`
= help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `xxx`
--> $DIR/mix.rs:47:10
@ -84,7 +84,7 @@ LL | cfg!(xxx = "foo");
| ^^^^^^^^^^^
|
= help: to expect this configuration use `--check-cfg=cfg(xxx, values("foo"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `xxx`
--> $DIR/mix.rs:49:10
@ -93,7 +93,7 @@ LL | cfg!(xxx);
| ^^^
|
= help: to expect this configuration use `--check-cfg=cfg(xxx)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `xxx`
--> $DIR/mix.rs:51:14
@ -102,7 +102,7 @@ LL | cfg!(any(xxx, windows));
| ^^^
|
= help: to expect this configuration use `--check-cfg=cfg(xxx)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `bad`
--> $DIR/mix.rs:53:14
@ -112,7 +112,7 @@ LL | cfg!(any(feature = "bad", windows));
|
= note: expected values for `feature` are: `foo`
= help: to expect this configuration use `--check-cfg=cfg(feature, values("bad"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `xxx`
--> $DIR/mix.rs:55:23
@ -121,7 +121,7 @@ LL | cfg!(any(windows, xxx));
| ^^^
|
= help: to expect this configuration use `--check-cfg=cfg(xxx)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `xxx`
--> $DIR/mix.rs:57:20
@ -130,7 +130,7 @@ LL | cfg!(all(unix, xxx));
| ^^^
|
= help: to expect this configuration use `--check-cfg=cfg(xxx)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `aa`
--> $DIR/mix.rs:59:14
@ -139,7 +139,7 @@ LL | cfg!(all(aa, bb));
| ^^
|
= help: to expect this configuration use `--check-cfg=cfg(aa)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `bb`
--> $DIR/mix.rs:59:18
@ -148,7 +148,7 @@ LL | cfg!(all(aa, bb));
| ^^
|
= help: to expect this configuration use `--check-cfg=cfg(bb)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `aa`
--> $DIR/mix.rs:62:14
@ -157,7 +157,7 @@ LL | cfg!(any(aa, bb));
| ^^
|
= help: to expect this configuration use `--check-cfg=cfg(aa)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `bb`
--> $DIR/mix.rs:62:18
@ -166,7 +166,7 @@ LL | cfg!(any(aa, bb));
| ^^
|
= help: to expect this configuration use `--check-cfg=cfg(bb)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `zebra`
--> $DIR/mix.rs:65:20
@ -176,7 +176,7 @@ LL | cfg!(any(unix, feature = "zebra"));
|
= note: expected values for `feature` are: `foo`
= help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `xxx`
--> $DIR/mix.rs:67:14
@ -185,7 +185,7 @@ LL | cfg!(any(xxx, feature = "zebra"));
| ^^^
|
= help: to expect this configuration use `--check-cfg=cfg(xxx)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `zebra`
--> $DIR/mix.rs:67:19
@ -195,7 +195,7 @@ LL | cfg!(any(xxx, feature = "zebra"));
|
= note: expected values for `feature` are: `foo`
= help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `xxx`
--> $DIR/mix.rs:70:14
@ -204,7 +204,7 @@ LL | cfg!(any(xxx, unix, xxx));
| ^^^
|
= help: to expect this configuration use `--check-cfg=cfg(xxx)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `xxx`
--> $DIR/mix.rs:70:25
@ -213,7 +213,7 @@ LL | cfg!(any(xxx, unix, xxx));
| ^^^
|
= help: to expect this configuration use `--check-cfg=cfg(xxx)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `zebra`
--> $DIR/mix.rs:73:14
@ -223,7 +223,7 @@ LL | cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
|
= note: expected values for `feature` are: `foo`
= help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `zebra`
--> $DIR/mix.rs:73:33
@ -233,7 +233,7 @@ LL | cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
|
= note: expected values for `feature` are: `foo`
= help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `zebra`
--> $DIR/mix.rs:73:52
@ -243,7 +243,7 @@ LL | cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
|
= note: expected values for `feature` are: `foo`
= help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `zebra`
--> $DIR/mix.rs:77:10
@ -252,7 +252,7 @@ LL | cfg!(target_feature = "zebra");
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512er`, `avx512f`, `avx512fp16`, `avx512ifma`, `avx512pf`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, `avx512vpopcntdq`, `bf16`, `bmi1`, `bmi2` and 187 more
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: 27 warnings emitted

View file

@ -1,5 +1,5 @@
warning: unexpected `cfg` condition value: `foo`
--> $DIR/no-expected-values.rs:11:7
--> $DIR/no-expected-values.rs:10:7
|
LL | #[cfg(feature = "foo")]
| ^^^^^^^--------
@ -8,11 +8,11 @@ LL | #[cfg(feature = "foo")]
|
= note: no expected value for `feature`
= help: to expect this configuration use `--check-cfg=cfg(feature, values("foo"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `foo`
--> $DIR/no-expected-values.rs:15:7
--> $DIR/no-expected-values.rs:14:7
|
LL | #[cfg(test = "foo")]
| ^^^^--------
@ -20,7 +20,7 @@ LL | #[cfg(test = "foo")]
| help: remove the value
|
= note: no expected value for `test`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: 2 warnings emitted

View file

@ -1,5 +1,5 @@
warning: unexpected `cfg` condition value: `foo`
--> $DIR/no-expected-values.rs:11:7
--> $DIR/no-expected-values.rs:10:7
|
LL | #[cfg(feature = "foo")]
| ^^^^^^^--------
@ -8,11 +8,11 @@ LL | #[cfg(feature = "foo")]
|
= note: no expected value for `feature`
= help: to expect this configuration use `--check-cfg=cfg(feature, values("foo"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `foo`
--> $DIR/no-expected-values.rs:15:7
--> $DIR/no-expected-values.rs:14:7
|
LL | #[cfg(test = "foo")]
| ^^^^--------
@ -20,7 +20,7 @@ LL | #[cfg(test = "foo")]
| help: remove the value
|
= note: no expected value for `test`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: 2 warnings emitted

View file

@ -2,7 +2,6 @@
//
//@ check-pass
//@ revisions: simple mixed empty
//@ compile-flags: -Z unstable-options
//@ compile-flags: --check-cfg=cfg(values,simple,mixed,empty)
//@ [simple]compile-flags: --check-cfg=cfg(test) --check-cfg=cfg(feature)
//@ [mixed]compile-flags: --check-cfg=cfg(test,feature)

View file

@ -1,5 +1,5 @@
warning: unexpected `cfg` condition value: `foo`
--> $DIR/no-expected-values.rs:11:7
--> $DIR/no-expected-values.rs:10:7
|
LL | #[cfg(feature = "foo")]
| ^^^^^^^--------
@ -8,11 +8,11 @@ LL | #[cfg(feature = "foo")]
|
= note: no expected value for `feature`
= help: to expect this configuration use `--check-cfg=cfg(feature, values("foo"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `foo`
--> $DIR/no-expected-values.rs:15:7
--> $DIR/no-expected-values.rs:14:7
|
LL | #[cfg(test = "foo")]
| ^^^^--------
@ -20,7 +20,7 @@ LL | #[cfg(test = "foo")]
| help: remove the value
|
= note: no expected value for `test`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: 2 warnings emitted

View file

@ -1,9 +1,7 @@
//@ check-pass
//
//@ revisions: values_before values_after
//@ compile-flags: -Z unstable-options
//@ compile-flags: --check-cfg=cfg(values_before,values_after)
//
//@ [values_before]compile-flags: --check-cfg=cfg(a,values("b")) --check-cfg=cfg(a)
//@ [values_after]compile-flags: --check-cfg=cfg(a) --check-cfg=cfg(a,values("b"))

View file

@ -1,12 +1,12 @@
warning: unexpected `cfg` condition value: `unk`
--> $DIR/order-independant.rs:13:7
--> $DIR/order-independant.rs:11:7
|
LL | #[cfg(a = "unk")]
| ^^^^^^^^^
|
= note: expected values for `a` are: (none), `b`
= help: to expect this configuration use `--check-cfg=cfg(a, values("unk"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View file

@ -1,12 +1,12 @@
warning: unexpected `cfg` condition value: `unk`
--> $DIR/order-independant.rs:13:7
--> $DIR/order-independant.rs:11:7
|
LL | #[cfg(a = "unk")]
| ^^^^^^^^^
|
= note: expected values for `a` are: (none), `b`
= help: to expect this configuration use `--check-cfg=cfg(a, values("unk"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View file

@ -1,7 +1,7 @@
// This test checks that there is no ICE with this code
//
//@ check-pass
//@ compile-flags:--check-cfg=cfg() -Z unstable-options
//@ compile-flags:--check-cfg=cfg()
fn main() {
#[cfg(crossbeam_loom)]

View file

@ -6,7 +6,7 @@ LL | #[cfg(crossbeam_loom)]
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
= help: to expect this configuration use `--check-cfg=cfg(crossbeam_loom)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View file

@ -1,7 +1,7 @@
// Check warning for unexpected configuration name
//
//@ check-pass
//@ compile-flags: --check-cfg=cfg() -Z unstable-options
//@ compile-flags: --check-cfg=cfg()
#[cfg(widnows)]
//~^ WARNING unexpected `cfg` condition name

View file

@ -5,7 +5,7 @@ LL | #[cfg(widnows)]
| ^^^^^^^ help: there is a config with a similar name: `windows`
|
= help: to expect this configuration use `--check-cfg=cfg(widnows)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View file

@ -1,7 +1,7 @@
// Check for unexpected configuration value in the code.
//
//@ check-pass
//@ compile-flags: --cfg=feature="rand" -Z unstable-options
//@ compile-flags: --cfg=feature="rand"
//@ compile-flags: --check-cfg=cfg(feature,values("serde","full"))
#[cfg(feature = "sedre")]

View file

@ -8,7 +8,7 @@ LL | #[cfg(feature = "sedre")]
|
= note: expected values for `feature` are: `full`, `serde`
= help: to expect this configuration use `--check-cfg=cfg(feature, values("sedre"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `rand`
@ -19,7 +19,7 @@ LL | #[cfg(feature = "rand")]
|
= note: expected values for `feature` are: `full`, `serde`
= help: to expect this configuration use `--check-cfg=cfg(feature, values("rand"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: 2 warnings emitted

View file

@ -2,7 +2,6 @@
//
//@ check-pass
//@ revisions: simple mixed with_values
//@ compile-flags: -Z unstable-options
//@ compile-flags: --check-cfg=cfg(simple,mixed,with_values)
//@ [simple]compile-flags: --check-cfg=cfg(foo,values(any()))
//@ [mixed]compile-flags: --check-cfg=cfg(foo) --check-cfg=cfg(foo,values(any()))

View file

@ -1,5 +1,5 @@
warning: unexpected `cfg` condition value: `too`
--> $DIR/values-none.rs:11:7
--> $DIR/values-none.rs:10:7
|
LL | #[cfg(foo = "too")]
| ^^^--------
@ -8,11 +8,11 @@ LL | #[cfg(foo = "too")]
|
= note: no expected value for `foo`
= help: to expect this configuration use `--check-cfg=cfg(foo, values("too"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `bar`
--> $DIR/values-none.rs:16:7
--> $DIR/values-none.rs:15:7
|
LL | #[cfg(foo = "bar")]
| ^^^--------
@ -21,7 +21,7 @@ LL | #[cfg(foo = "bar")]
|
= note: no expected value for `foo`
= help: to expect this configuration use `--check-cfg=cfg(foo, values("bar"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: 2 warnings emitted

View file

@ -1,5 +1,5 @@
warning: unexpected `cfg` condition value: `too`
--> $DIR/values-none.rs:11:7
--> $DIR/values-none.rs:10:7
|
LL | #[cfg(foo = "too")]
| ^^^--------
@ -8,11 +8,11 @@ LL | #[cfg(foo = "too")]
|
= note: no expected value for `foo`
= help: to expect this configuration use `--check-cfg=cfg(foo, values("too"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `bar`
--> $DIR/values-none.rs:16:7
--> $DIR/values-none.rs:15:7
|
LL | #[cfg(foo = "bar")]
| ^^^--------
@ -21,7 +21,7 @@ LL | #[cfg(foo = "bar")]
|
= note: no expected value for `foo`
= help: to expect this configuration use `--check-cfg=cfg(foo, values("bar"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: 2 warnings emitted

View file

@ -1,7 +1,6 @@
//@ check-pass
//
//@ revisions: explicit implicit
//@ compile-flags: -Zunstable-options
//@ [explicit]compile-flags: --check-cfg=cfg(foo,values(none()))
//@ [implicit]compile-flags: --check-cfg=cfg(foo)
//@ [simple] compile-flags: --check-cfg=cfg(foo,values(none(),"too"))

View file

@ -2,7 +2,7 @@
//
//@ check-pass
//@ needs-llvm-components: x86
//@ compile-flags: --crate-type=lib --check-cfg=cfg() --target={{src-base}}/check-cfg/my-awesome-platform.json -Z unstable-options
//@ compile-flags: --crate-type=lib --check-cfg=cfg() --target={{src-base}}/check-cfg/my-awesome-platform.json
#![feature(lang_items, no_core, auto_traits)]
#![no_core]

View file

@ -1,7 +1,7 @@
// This test checks that we lint on non well known names and that we don't lint on well known names
//
//@ check-pass
//@ compile-flags: --check-cfg=cfg() -Z unstable-options
//@ compile-flags: --check-cfg=cfg()
#[cfg(target_oz = "linux")]
//~^ WARNING unexpected `cfg` condition name

View file

@ -5,7 +5,7 @@ LL | #[cfg(target_oz = "linux")]
| ^^^^^^^^^^^^^^^^^^^
|
= help: to expect this configuration use `--check-cfg=cfg(target_oz, values("linux"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
help: there is a config with a similar name and value
|
@ -20,7 +20,7 @@ LL | #[cfg(features = "foo")]
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
= help: to expect this configuration use `--check-cfg=cfg(features, values("foo"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `feature`
--> $DIR/well-known-names.rs:17:7
@ -29,7 +29,7 @@ LL | #[cfg(feature = "foo")]
| ^^^^^^^^^^^^^^^
|
= help: to expect this configuration use `--check-cfg=cfg(feature, values("foo"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `uniw`
--> $DIR/well-known-names.rs:21:7
@ -38,7 +38,7 @@ LL | #[cfg(uniw)]
| ^^^^ help: there is a config with a similar name: `unix`
|
= help: to expect this configuration use `--check-cfg=cfg(uniw)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: 4 warnings emitted

View file

@ -5,7 +5,7 @@
// values since the suggestion shows them.
//
//@ check-pass
//@ compile-flags: --check-cfg=cfg() -Z unstable-options
//@ compile-flags: --check-cfg=cfg()
//@ compile-flags: -Zcheck-cfg-all-expected
#![feature(cfg_overflow_checks)]

View file

@ -7,7 +7,7 @@ LL | clippy = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `clippy`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
@ -19,7 +19,7 @@ LL | debug_assertions = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `debug_assertions`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:31:5
@ -30,7 +30,7 @@ LL | doc = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `doc`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:33:5
@ -41,7 +41,7 @@ LL | doctest = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `doctest`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:35:5
@ -52,7 +52,7 @@ LL | miri = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `miri`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:37:5
@ -63,7 +63,7 @@ LL | overflow_checks = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `overflow_checks`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:39:5
@ -72,7 +72,7 @@ LL | panic = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `panic` are: `abort`, `unwind`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:41:5
@ -83,7 +83,7 @@ LL | proc_macro = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `proc_macro`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:43:5
@ -92,7 +92,7 @@ LL | relocation_model = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `relocation_model` are: `dynamic-no-pic`, `pic`, `pie`, `ropi`, `ropi-rwpi`, `rwpi`, `static`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:45:5
@ -101,7 +101,7 @@ LL | sanitize = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `sanitize` are: `address`, `cfi`, `dataflow`, `hwaddress`, `kcfi`, `kernel-address`, `leak`, `memory`, `memtag`, `safestack`, `shadow-call-stack`, `thread`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:47:5
@ -110,7 +110,7 @@ LL | target_abi = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_abi` are: ``, `abi64`, `abiv2`, `abiv2hf`, `eabi`, `eabihf`, `elf`, `fortanix`, `ilp32`, `llvm`, `macabi`, `sim`, `softfloat`, `spe`, `uwp`, `vec-extabi`, `x32`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:49:5
@ -119,7 +119,7 @@ LL | target_arch = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_arch` are: `aarch64`, `arm`, `arm64ec`, `avr`, `bpf`, `csky`, `hexagon`, `loongarch64`, `m68k`, `mips`, `mips32r6`, `mips64`, `mips64r6`, `msp430`, `nvptx64`, `powerpc`, `powerpc64`, `riscv32`, `riscv64`, `s390x`, `sparc`, `sparc64`, `wasm32`, `wasm64`, `x86`, `x86_64`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:51:5
@ -128,7 +128,7 @@ LL | target_endian = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_endian` are: `big`, `little`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:53:5
@ -137,7 +137,7 @@ LL | target_env = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_env` are: ``, `gnu`, `msvc`, `musl`, `newlib`, `nto70`, `nto71`, `ohos`, `p2`, `psx`, `relibc`, `sgx`, `uclibc`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:55:5
@ -146,7 +146,7 @@ LL | target_family = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_family` are: `unix`, `wasm`, `windows`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:57:5
@ -155,7 +155,7 @@ LL | target_feature = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512er`, `avx512f`, `avx512fp16`, `avx512ifma`, `avx512pf`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, `avx512vpopcntdq`, `bf16`, `bmi1`, `bmi2`, `bti`, `bulk-memory`, `c`, `cache`, `cmpxchg16b`, `crc`, `crt-static`, `d`, `d32`, `dit`, `doloop`, `dotprod`, `dpb`, `dpb2`, `dsp`, `dsp1e2`, `dspe60`, `e`, `e1`, `e2`, `edsp`, `elrw`, `ermsb`, `exception-handling`, `f`, `f16c`, `f32mm`, `f64mm`, `fast-unaligned-access`, `fcma`, `fdivdu`, `fhm`, `flagm`, `float1e2`, `float1e3`, `float3e4`, `float7e60`, `floate1`, `fma`, `fp-armv8`, `fp16`, `fp64`, `fpuv2_df`, `fpuv2_sf`, `fpuv3_df`, `fpuv3_hf`, `fpuv3_hi`, `fpuv3_sf`, `frecipe`, `frintts`, `fxsr`, `gfni`, `hard-float`, `hard-float-abi`, `hard-tp`, `high-registers`, `hvx`, `hvx-length128b`, `hwdiv`, `i8mm`, `jsconv`, `lahfsahf`, `lasx`, `lbt`, `lor`, `lse`, `lsx`, `lvz`, `lzcnt`, `m`, `mclass`, `movbe`, `mp`, `mp1e2`, `msa`, `mte`, `multivalue`, `mutable-globals`, `neon`, `nontrapping-fptoint`, `nvic`, `paca`, `pacg`, `pan`, `pclmulqdq`, `pmuv3`, `popcnt`, `power10-vector`, `power8-altivec`, `power8-vector`, `power9-altivec`, `power9-vector`, `prfchw`, `rand`, `ras`, `rclass`, `rcpc`, `rcpc2`, `rdm`, `rdrand`, `rdseed`, `reference-types`, `relax`, `relaxed-simd`, `rtm`, `sb`, `sha`, `sha2`, `sha3`, `sign-ext`, `simd128`, `sm4`, `spe`, `ssbs`, `sse`, `sse2`, `sse3`, `sse4.1`, `sse4.2`, `sse4a`, `ssse3`, `sve`, `sve2`, `sve2-aes`, `sve2-bitperm`, `sve2-sha3`, `sve2-sm4`, `tbm`, `thumb-mode`, `thumb2`, `tme`, `trust`, `trustzone`, `ual`, `v`, `v5te`, `v6`, `v6k`, `v6t2`, `v7`, `v8`, `v8.1a`, `v8.2a`, `v8.3a`, `v8.4a`, `v8.5a`, `v8.6a`, `v8.7a`, `vaes`, `vdsp2e60f`, `vdspv1`, `vdspv2`, `vfp2`, `vfp3`, `vfp4`, `vh`, `virt`, `virtualization`, `vpclmulqdq`, `vsx`, `xsave`, `xsavec`, `xsaveopt`, `xsaves`, `zba`, `zbb`, `zbc`, `zbkb`, `zbkc`, `zbkx`, `zbs`, `zdinx`, `zfh`, `zfhmin`, `zfinx`, `zhinx`, `zhinxmin`, `zk`, `zkn`, `zknd`, `zkne`, `zknh`, `zkr`, `zks`, `zksed`, `zksh`, `zkt`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:59:5
@ -164,7 +164,7 @@ LL | target_has_atomic = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_has_atomic` are: (none), `128`, `16`, `32`, `64`, `8`, `ptr`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:61:5
@ -173,7 +173,7 @@ LL | target_has_atomic_equal_alignment = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_has_atomic_equal_alignment` are: (none), `128`, `16`, `32`, `64`, `8`, `ptr`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:63:5
@ -182,7 +182,7 @@ LL | target_has_atomic_load_store = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_has_atomic_load_store` are: (none), `128`, `16`, `32`, `64`, `8`, `ptr`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:65:5
@ -191,7 +191,7 @@ LL | target_os = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_os` are: `aix`, `android`, `cuda`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `macos`, `netbsd`, `none`, `nto`, `openbsd`, `psp`, `redox`, `solaris`, `solid_asp3`, `teeos`, `tvos`, `uefi`, `unknown`, `visionos`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`, `zkvm`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:67:5
@ -200,7 +200,7 @@ LL | target_pointer_width = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_pointer_width` are: `16`, `32`, `64`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:69:5
@ -211,7 +211,7 @@ LL | target_thread_local = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `target_thread_local`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:71:5
@ -220,7 +220,7 @@ LL | target_vendor = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_vendor` are: `apple`, `espressif`, `fortanix`, `ibm`, `kmc`, `nintendo`, `nvidia`, `pc`, `risc0`, `sony`, `sun`, `unikraft`, `unknown`, `uwp`, `win7`, `wrs`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:73:5
@ -231,7 +231,7 @@ LL | test = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `test`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:75:5
@ -242,7 +242,7 @@ LL | ub_checks = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `ub_checks`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:77:5
@ -253,7 +253,7 @@ LL | unix = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `unix`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:79:5
@ -264,7 +264,7 @@ LL | windows = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `windows`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `linuz`
--> $DIR/well-known-values.rs:85:7
@ -275,7 +275,7 @@ LL | #[cfg(target_os = "linuz")] // testing that we suggest `linux`
| help: there is a expected value with a similar name: `"linux"`
|
= note: expected values for `target_os` are: `aix`, `android`, `cuda`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `macos`, `netbsd`, `none`, `nto`, `openbsd`, `psp`, `redox`, `solaris`, `solid_asp3`, `teeos`, `tvos`, `uefi`, `unknown`, `visionos`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`, `zkvm`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: 28 warnings emitted

View file

@ -1,3 +0,0 @@
//@ compile-flags: --check-cfg "cfg()"
fn main() {}

View file

@ -1,2 +0,0 @@
error: the `-Z unstable-options` flag must also be passed to enable the flag `check-cfg`

View file

@ -728,7 +728,7 @@ cc = ["@rust-lang/project-exploit-mitigations", "@rcvalle"]
[mentions."src/doc/unstable-book/src/language-features/no-sanitize.md"]
cc = ["@rust-lang/project-exploit-mitigations", "@rcvalle"]
[mentions."src/doc/unstable-book/src/compiler-flags/check-cfg.md"]
[mentions."src/doc/rustc/src/check-cfg.md"]
cc = ["@Urgau"]
[mentions."src/doc/rustc/src/platform-support"]