Add more suggestion to unexpected cfg names and values

This commit is contained in:
Urgau 2023-11-22 16:50:24 +01:00
parent 5b8bc568d2
commit 5345a166fe
32 changed files with 468 additions and 77 deletions

View File

@ -706,9 +706,13 @@ pub trait LintContext {
},
BuiltinLintDiagnostics::UnexpectedCfgName((name, name_span), value) => {
let possibilities: Vec<Symbol> = sess.parse_sess.check_config.expecteds.keys().copied().collect();
let is_from_cargo = std::env::var_os("CARGO").is_some();
let mut is_feature_cfg = name == sym::feature;
if is_feature_cfg && is_from_cargo {
db.help("consider defining some features in `Cargo.toml`");
// Suggest the most probable if we found one
if let Some(best_match) = find_best_match_for_name(&possibilities, name, None) {
} else if let Some(best_match) = find_best_match_for_name(&possibilities, name, None) {
if let Some(ExpectedValues::Some(best_match_values)) =
sess.parse_sess.check_config.expecteds.get(&best_match) {
let mut possibilities = best_match_values.iter()
@ -741,8 +745,8 @@ pub trait LintContext {
} else {
db.span_suggestion(name_span, "there is a config with a similar name", best_match, Applicability::MaybeIncorrect);
}
} else if name == sym::feature && std::env::var_os("CARGO").is_some() {
db.help("consider defining some features in `Cargo.toml`");
is_feature_cfg |= best_match == sym::feature;
} else if !possibilities.is_empty() {
let mut possibilities = possibilities.iter()
.map(Symbol::as_str)
@ -756,6 +760,23 @@ pub trait LintContext {
// once.
db.help_once(format!("expected names are: `{possibilities}`"));
}
let inst = if let Some((value, _value_span)) = value {
let pre = if is_from_cargo { "\\" } else { "" };
format!("cfg({name}, values({pre}\"{value}{pre}\"))")
} else {
format!("cfg({name})")
};
if is_from_cargo {
if !is_feature_cfg {
db.help(format!("consider using a Cargo feature instead or adding `println!(\"cargo:rustc-check-cfg={inst}\");` to the top of a `build.rs`"));
}
db.note("see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration");
} else {
db.help(format!("to expect this configuration use `--check-cfg={inst}`"));
db.note("see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration");
}
},
BuiltinLintDiagnostics::UnexpectedCfgValue((name, name_span), value) => {
let Some(ExpectedValues::Some(values)) = &sess.parse_sess.check_config.expecteds.get(&name) else {
@ -767,6 +788,7 @@ pub trait LintContext {
.copied()
.flatten()
.collect();
let is_from_cargo = std::env::var_os("CARGO").is_some();
// Show the full list if all possible values for a given name, but don't do it
// for names as the possibilities could be very long
@ -787,6 +809,8 @@ pub trait LintContext {
db.span_suggestion(value_span, "there is a expected value with a similar name", format!("\"{best_match}\""), Applicability::MaybeIncorrect);
}
} else if name == sym::feature && is_from_cargo {
db.help(format!("consider defining `{name}` as feature in `Cargo.toml`"));
} else if let &[first_possibility] = &possibilities[..] {
db.span_suggestion(name_span.shrink_to_hi(), "specify a config value", format!(" = \"{first_possibility}\""), Applicability::MaybeIncorrect);
}
@ -796,6 +820,27 @@ pub trait LintContext {
db.span_suggestion(name_span.shrink_to_hi().to(value_span), "remove the value", "", Applicability::MaybeIncorrect);
}
}
let inst = if let Some((value, _value_span)) = value {
let pre = if is_from_cargo { "\\" } else { "" };
format!("cfg({name}, values({pre}\"{value}{pre}\"))")
} else {
format!("cfg({name})")
};
if is_from_cargo {
if name == sym::feature {
if let Some((value, _value_span)) = value {
db.help(format!("consider adding `{value}` as a feature in `Cargo.toml`"));
}
} else {
db.help(format!("consider using a Cargo feature instead or adding `println!(\"cargo:rustc-check-cfg={inst}\");` to the top of a `build.rs`"));
}
db.note("see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration");
} else {
db.help(format!("to expect this configuration use `--check-cfg={inst}`"));
db.note("see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration");
}
},
BuiltinLintDiagnostics::DeprecatedWhereclauseLocation(new_span, suggestion) => {
db.multipart_suggestion(

View File

@ -4,6 +4,8 @@ warning: unexpected `cfg` condition name: `uniz`
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: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View File

@ -5,6 +5,8 @@ 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: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View File

@ -5,6 +5,8 @@ LL | #[cfg(FALSE)]
| ^^^^^
|
= help: expected names are: `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`, `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: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View File

@ -0,0 +1,31 @@
warning: unexpected `cfg` condition name: `feature`
--> $DIR/cargo-feature.rs:13:7
|
LL | #[cfg(feature = "serde")]
| ^^^^^^^^^^^^^^^^^
|
= help: consider defining some features in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition name: `tokio_unstable`
--> $DIR/cargo-feature.rs:18:7
|
LL | #[cfg(tokio_unstable)]
| ^^^^^^^^^^^^^^
|
= help: expected names are: `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`, `unix`, `windows`
= help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(tokio_unstable)");` to the top of a `build.rs`
= 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:22:7
|
LL | #[cfg(CONFIG_NVME = "m")]
| ^^^^^^^^^^^^^^^^^
|
= help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(CONFIG_NVME, values(\"m\"))");` to the top of a `build.rs`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
warning: 3 warnings emitted

View File

@ -3,12 +3,25 @@
// list of all the expected names
//
// check-pass
// revisions: some none
// rustc-env:CARGO=/usr/bin/cargo
// compile-flags: --check-cfg=cfg() -Z unstable-options
// error-pattern:Cargo.toml
// [some]compile-flags: --check-cfg=cfg(feature,values("bitcode"))
// [some]compile-flags: --check-cfg=cfg(CONFIG_NVME,values("y"))
// [none]error-pattern:Cargo.toml
#[cfg(feature = "serde")]
//~^ WARNING unexpected `cfg` condition name
//[none]~^ WARNING unexpected `cfg` condition name
//[some]~^^ WARNING unexpected `cfg` condition value
fn ser() {}
#[cfg(tokio_unstable)]
//~^ WARNING unexpected `cfg` condition name
fn tokio() {}
#[cfg(CONFIG_NVME = "m")]
//[none]~^ WARNING unexpected `cfg` condition name
//[some]~^^ WARNING unexpected `cfg` condition value
fn tokio() {}
fn main() {}

View File

@ -0,0 +1,35 @@
warning: unexpected `cfg` condition value: `serde`
--> $DIR/cargo-feature.rs:13:7
|
LL | #[cfg(feature = "serde")]
| ^^^^^^^^^^^^^^^^^
|
= note: expected values for `feature` are: `bitcode`
= help: consider adding `serde` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition name: `tokio_unstable`
--> $DIR/cargo-feature.rs:18:7
|
LL | #[cfg(tokio_unstable)]
| ^^^^^^^^^^^^^^
|
= help: expected names are: `CONFIG_NVME`, `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`, `unix`, `windows`
= help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(tokio_unstable)");` to the top of a `build.rs`
= 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:22:7
|
LL | #[cfg(CONFIG_NVME = "m")]
| ^^^^^^^^^^^^^^---
| |
| help: there is a expected value with a similar name: `"y"`
|
= note: expected values for `CONFIG_NVME` are: `y`
= help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(CONFIG_NVME, values(\"m\"))");` to the top of a `build.rs`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
warning: 3 warnings emitted

View File

@ -1,11 +0,0 @@
warning: unexpected `cfg` condition name: `feature`
--> $DIR/cargo-feature.rs:10:7
|
LL | #[cfg(feature = "serde")]
| ^^^^^^^^^^^^^^^^^
|
= help: consider defining some features in `Cargo.toml`
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View File

@ -5,6 +5,8 @@ LL | #[cfg(target(os = "linux", architecture = "arm"))]
| ^^^^^^^^^^^^^^^^^^^^
|
= help: expected names are: `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`, `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: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View File

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

View File

@ -5,6 +5,8 @@ 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: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `unk`
@ -14,6 +16,8 @@ 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
warning: 2 warnings emitted

View File

@ -0,0 +1,71 @@
warning: unexpected `cfg` condition name: `featur`
--> $DIR/diagnotics.rs:7:7
|
LL | #[cfg(featur)]
| ^^^^^^ help: there is a config with a similar name: `feature`
|
= help: expected values for `feature` are: `foo`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition name: `featur`
--> $DIR/diagnotics.rs:11:7
|
LL | #[cfg(featur = "foo")]
| ^^^^^^^^^^^^^^
|
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
help: there is a config with a similar name and value
|
LL | #[cfg(feature = "foo")]
| ~~~~~~~
warning: unexpected `cfg` condition name: `featur`
--> $DIR/diagnotics.rs:15:7
|
LL | #[cfg(featur = "fo")]
| ^^^^^^^^^^^^^
|
= help: expected values for `feature` are: `foo`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
help: there is a config with a similar name and different values
|
LL | #[cfg(feature = "foo")]
| ~~~~~~~~~~~~~~~
warning: unexpected `cfg` condition name: `no_value`
--> $DIR/diagnotics.rs:22:7
|
LL | #[cfg(no_value)]
| ^^^^^^^^ help: there is a config with a similar name: `no_values`
|
= help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(no_value)");` to the top of a `build.rs`
= 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: `no_value`
--> $DIR/diagnotics.rs:26:7
|
LL | #[cfg(no_value = "foo")]
| ^^^^^^^^^^^^^^^^
|
= help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(no_value, values(\"foo\"))");` to the top of a `build.rs`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
help: there is a config with a similar name and no value
|
LL | #[cfg(no_values)]
| ~~~~~~~~~
warning: unexpected `cfg` condition value: `bar`
--> $DIR/diagnotics.rs:30:7
|
LL | #[cfg(no_values = "bar")]
| ^^^^^^^^^--------
| |
| help: remove the value
|
= note: no expected value for `no_values`
= help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(no_values, values(\"bar\"))");` to the top of a `build.rs`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
warning: 6 warnings emitted

View File

@ -1,4 +1,7 @@
// check-pass
// revisions: cargo rustc
// [rustc]unset-rustc-env:CARGO
// [cargo]rustc-env:CARGO=/usr/bin/cargo
// compile-flags: --check-cfg=cfg(feature,values("foo")) --check-cfg=cfg(no_values) -Z unstable-options
#[cfg(featur)]

View File

@ -0,0 +1,74 @@
warning: unexpected `cfg` condition name: `featur`
--> $DIR/diagnotics.rs:7:7
|
LL | #[cfg(featur)]
| ^^^^^^ help: there is a config with a similar name: `feature`
|
= 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: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition name: `featur`
--> $DIR/diagnotics.rs:11: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
help: there is a config with a similar name and value
|
LL | #[cfg(feature = "foo")]
| ~~~~~~~
warning: unexpected `cfg` condition name: `featur`
--> $DIR/diagnotics.rs:15: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
help: there is a config with a similar name and different values
|
LL | #[cfg(feature = "foo")]
| ~~~~~~~~~~~~~~~
warning: unexpected `cfg` condition name: `no_value`
--> $DIR/diagnotics.rs:22: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
warning: unexpected `cfg` condition name: `no_value`
--> $DIR/diagnotics.rs:26: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
help: there is a config with a similar name and no value
|
LL | #[cfg(no_values)]
| ~~~~~~~~~
warning: unexpected `cfg` condition value: `bar`
--> $DIR/diagnotics.rs:30:7
|
LL | #[cfg(no_values = "bar")]
| ^^^^^^^^^--------
| |
| help: remove the value
|
= 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
warning: 6 warnings emitted

View File

@ -1,61 +0,0 @@
warning: unexpected `cfg` condition name: `featur`
--> $DIR/diagnotics.rs:4:7
|
LL | #[cfg(featur)]
| ^^^^^^ help: there is a config with a similar name: `feature`
|
= help: expected values for `feature` are: `foo`
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition name: `featur`
--> $DIR/diagnotics.rs:8:7
|
LL | #[cfg(featur = "foo")]
| ^^^^^^^^^^^^^^
|
help: there is a config with a similar name and value
|
LL | #[cfg(feature = "foo")]
| ~~~~~~~
warning: unexpected `cfg` condition name: `featur`
--> $DIR/diagnotics.rs:12:7
|
LL | #[cfg(featur = "fo")]
| ^^^^^^^^^^^^^
|
= help: expected values for `feature` are: `foo`
help: there is a config with a similar name and different values
|
LL | #[cfg(feature = "foo")]
| ~~~~~~~~~~~~~~~
warning: unexpected `cfg` condition name: `no_value`
--> $DIR/diagnotics.rs:19:7
|
LL | #[cfg(no_value)]
| ^^^^^^^^ help: there is a config with a similar name: `no_values`
warning: unexpected `cfg` condition name: `no_value`
--> $DIR/diagnotics.rs:23:7
|
LL | #[cfg(no_value = "foo")]
| ^^^^^^^^^^^^^^^^
|
help: there is a config with a similar name and no value
|
LL | #[cfg(no_values)]
| ~~~~~~~~~
warning: unexpected `cfg` condition value: `bar`
--> $DIR/diagnotics.rs:27:7
|
LL | #[cfg(no_values = "bar")]
| ^^^^^^^^^--------
| |
| help: remove the value
|
= note: no expected value for `no_values`
warning: 6 warnings emitted

View File

@ -5,6 +5,8 @@ LL | #[cfg(unknown_key = "value")]
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: expected names are: `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`, `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: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `value`
@ -16,18 +18,26 @@ LL | #[cfg(test = "value")]
| help: remove the value
|
= note: no expected value for `test`
= help: to expect this configuration use `--check-cfg=cfg(test, values("value"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `feature`
--> $DIR/exhaustive-names-values.rs:18: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
warning: unexpected `cfg` condition name: `feature`
--> $DIR/exhaustive-names-values.rs:25: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
warning: 4 warnings emitted

View File

@ -5,6 +5,8 @@ LL | #[cfg(unknown_key = "value")]
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: expected names are: `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`, `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: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `value`
@ -16,6 +18,8 @@ LL | #[cfg(test = "value")]
| help: remove the value
|
= note: no expected value for `test`
= help: to expect this configuration use `--check-cfg=cfg(test, values("value"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `unk`
--> $DIR/exhaustive-names-values.rs:18:7
@ -24,6 +28,8 @@ 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
warning: 3 warnings emitted

View File

@ -5,6 +5,8 @@ LL | #[cfg(unknown_key = "value")]
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: expected names are: `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`, `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: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `value`
@ -16,6 +18,8 @@ LL | #[cfg(test = "value")]
| help: remove the value
|
= note: no expected value for `test`
= help: to expect this configuration use `--check-cfg=cfg(test, values("value"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `unk`
--> $DIR/exhaustive-names-values.rs:18:7
@ -24,6 +28,8 @@ 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
warning: 3 warnings emitted

View File

@ -5,6 +5,8 @@ LL | #[cfg(unknown_key = "value")]
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: expected names are: `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`, `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: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View File

@ -7,6 +7,8 @@ LL | #[cfg(test = "value")]
| help: remove the value
|
= note: no expected value for `test`
= help: to expect this configuration use `--check-cfg=cfg(test, 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: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View File

@ -7,6 +7,8 @@ LL | #[cfg(test = "value")]
| help: remove the value
|
= note: no expected value for `test`
= help: to expect this configuration use `--check-cfg=cfg(test, 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: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View File

@ -4,6 +4,8 @@ warning: unexpected `cfg` condition name: `widnows`
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: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: (none)
@ -13,6 +15,8 @@ LL | #[cfg(feature)]
| ^^^^^^^- help: specify a config value: `= "foo"`
|
= 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
warning: unexpected `cfg` condition value: `bar`
--> $DIR/mix.rs:23:7
@ -21,6 +25,8 @@ 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
warning: unexpected `cfg` condition value: `zebra`
--> $DIR/mix.rs:27:7
@ -29,6 +35,8 @@ 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
warning: unexpected `cfg` condition name: `uu`
--> $DIR/mix.rs:31:12
@ -37,12 +45,17 @@ LL | #[cfg_attr(uu, test)]
| ^^
|
= help: expected names are: `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`, `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
warning: unexpected `cfg` condition name: `widnows`
--> $DIR/mix.rs:40:10
|
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
warning: unexpected `cfg` condition value: `bar`
--> $DIR/mix.rs:43:10
@ -51,6 +64,8 @@ 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
warning: unexpected `cfg` condition value: `zebra`
--> $DIR/mix.rs:45:10
@ -59,24 +74,35 @@ 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
warning: unexpected `cfg` condition name: `xxx`
--> $DIR/mix.rs:47:10
|
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
warning: unexpected `cfg` condition name: `xxx`
--> $DIR/mix.rs:49:10
|
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
warning: unexpected `cfg` condition name: `xxx`
--> $DIR/mix.rs:51:14
|
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
warning: unexpected `cfg` condition value: `bad`
--> $DIR/mix.rs:53:14
@ -85,42 +111,62 @@ 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
warning: unexpected `cfg` condition name: `xxx`
--> $DIR/mix.rs:55:23
|
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
warning: unexpected `cfg` condition name: `xxx`
--> $DIR/mix.rs:57:20
|
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
warning: unexpected `cfg` condition name: `aa`
--> $DIR/mix.rs:59:14
|
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
warning: unexpected `cfg` condition name: `bb`
--> $DIR/mix.rs:59:18
|
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
warning: unexpected `cfg` condition name: `aa`
--> $DIR/mix.rs:62:14
|
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
warning: unexpected `cfg` condition name: `bb`
--> $DIR/mix.rs:62:18
|
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
warning: unexpected `cfg` condition value: `zebra`
--> $DIR/mix.rs:65:20
@ -129,12 +175,17 @@ 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
warning: unexpected `cfg` condition name: `xxx`
--> $DIR/mix.rs:67:14
|
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
warning: unexpected `cfg` condition value: `zebra`
--> $DIR/mix.rs:67:19
@ -143,18 +194,26 @@ 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
warning: unexpected `cfg` condition name: `xxx`
--> $DIR/mix.rs:70:14
|
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
warning: unexpected `cfg` condition name: `xxx`
--> $DIR/mix.rs:70:25
|
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
warning: unexpected `cfg` condition value: `zebra`
--> $DIR/mix.rs:73:14
@ -163,6 +222,8 @@ 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
warning: unexpected `cfg` condition value: `zebra`
--> $DIR/mix.rs:73:33
@ -171,6 +232,8 @@ 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
warning: unexpected `cfg` condition value: `zebra`
--> $DIR/mix.rs:73:52
@ -179,6 +242,8 @@ 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
warning: 26 warnings emitted

View File

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

View File

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

View File

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

View File

@ -5,6 +5,8 @@ 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: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View File

@ -5,6 +5,8 @@ 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: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View File

@ -5,6 +5,8 @@ LL | #[cfg(crossbeam_loom)]
| ^^^^^^^^^^^^^^
|
= help: expected names are: `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`, `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: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View File

@ -4,6 +4,8 @@ warning: unexpected `cfg` condition name: `widnows`
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: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted

View File

@ -7,6 +7,8 @@ LL | #[cfg(feature = "sedre")]
| help: there is a expected value with a similar name: `"serde"`
|
= 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: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `rand`
@ -16,6 +18,8 @@ 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
warning: 2 warnings emitted

View File

@ -4,6 +4,8 @@ warning: unexpected `cfg` condition name: `target_oz`
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: `#[warn(unexpected_cfgs)]` on by default
help: there is a config with a similar name and value
|
@ -17,18 +19,26 @@ LL | #[cfg(features = "foo")]
| ^^^^^^^^^^^^^^^^
|
= help: expected names are: `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`, `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
warning: unexpected `cfg` condition name: `feature`
--> $DIR/well-known-names.rs:17: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
warning: unexpected `cfg` condition name: `uniw`
--> $DIR/well-known-names.rs:21: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
warning: 4 warnings emitted

View File

@ -7,6 +7,8 @@ LL | debug_assertions = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `debug_assertions`
= help: to expect this configuration use `--check-cfg=cfg(debug_assertions, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
@ -18,6 +20,8 @@ LL | doc = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `doc`
= help: to expect this configuration use `--check-cfg=cfg(doc, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:30:5
@ -28,6 +32,8 @@ LL | doctest = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `doctest`
= help: to expect this configuration use `--check-cfg=cfg(doctest, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:32:5
@ -38,6 +44,8 @@ LL | miri = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `miri`
= help: to expect this configuration use `--check-cfg=cfg(miri, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:34:5
@ -48,6 +56,8 @@ LL | overflow_checks = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `overflow_checks`
= help: to expect this configuration use `--check-cfg=cfg(overflow_checks, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:36:5
@ -56,6 +66,8 @@ LL | panic = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `panic` are: `abort`, `unwind`
= help: to expect this configuration use `--check-cfg=cfg(panic, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:38:5
@ -66,6 +78,8 @@ LL | proc_macro = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `proc_macro`
= help: to expect this configuration use `--check-cfg=cfg(proc_macro, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:40:5
@ -74,6 +88,8 @@ LL | relocation_model = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `relocation_model` are: `dynamic-no-pic`, `pic`, `pie`, `ropi`, `ropi-rwpi`, `rwpi`, `static`
= help: to expect this configuration use `--check-cfg=cfg(relocation_model, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:42:5
@ -82,6 +98,8 @@ LL | sanitize = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `sanitize` are: `address`, `cfi`, `hwaddress`, `kcfi`, `kernel-address`, `leak`, `memory`, `memtag`, `safestack`, `shadow-call-stack`, `thread`
= help: to expect this configuration use `--check-cfg=cfg(sanitize, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:44:5
@ -90,6 +108,8 @@ 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`
= help: to expect this configuration use `--check-cfg=cfg(target_abi, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:46:5
@ -98,6 +118,8 @@ LL | target_arch = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_arch` are: `aarch64`, `arm`, `avr`, `bpf`, `csky`, `hexagon`, `loongarch64`, `m68k`, `mips`, `mips32r6`, `mips64`, `mips64r6`, `msp430`, `nvptx64`, `powerpc`, `powerpc64`, `riscv32`, `riscv64`, `s390x`, `sparc`, `sparc64`, `wasm32`, `wasm64`, `x86`, `x86_64`
= help: to expect this configuration use `--check-cfg=cfg(target_arch, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:48:5
@ -106,6 +128,8 @@ LL | target_endian = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_endian` are: `big`, `little`
= help: to expect this configuration use `--check-cfg=cfg(target_endian, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:50:5
@ -114,6 +138,8 @@ LL | target_env = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_env` are: ``, `eabihf`, `gnu`, `gnueabihf`, `msvc`, `musl`, `newlib`, `nto70`, `nto71`, `ohos`, `psx`, `relibc`, `sgx`, `uclibc`
= help: to expect this configuration use `--check-cfg=cfg(target_env, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:52:5
@ -122,6 +148,8 @@ LL | target_family = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_family` are: `unix`, `wasm`, `windows`
= help: to expect this configuration use `--check-cfg=cfg(target_family, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:55:5
@ -130,6 +158,8 @@ LL | target_has_atomic = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_has_atomic` are: (none), `128`, `16`, `32`, `64`, `8`, `ptr`
= help: to expect this configuration use `--check-cfg=cfg(target_has_atomic, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:57:5
@ -138,6 +168,8 @@ 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`
= help: to expect this configuration use `--check-cfg=cfg(target_has_atomic_equal_alignment, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:59:5
@ -146,6 +178,8 @@ 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`
= help: to expect this configuration use `--check-cfg=cfg(target_has_atomic_load_store, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:61:5
@ -154,6 +188,8 @@ 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`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`
= help: to expect this configuration use `--check-cfg=cfg(target_os, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:63:5
@ -162,6 +198,8 @@ LL | target_pointer_width = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_pointer_width` are: `16`, `32`, `64`
= help: to expect this configuration use `--check-cfg=cfg(target_pointer_width, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:65:5
@ -172,6 +210,8 @@ LL | target_thread_local = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `target_thread_local`
= help: to expect this configuration use `--check-cfg=cfg(target_thread_local, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:67:5
@ -180,6 +220,8 @@ LL | target_vendor = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_vendor` are: `apple`, `espressif`, `fortanix`, `ibm`, `kmc`, `nintendo`, `nvidia`, `pc`, `sony`, `sun`, `unikraft`, `unknown`, `uwp`, `win7`, `wrs`
= help: to expect this configuration use `--check-cfg=cfg(target_vendor, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:69:5
@ -190,6 +232,8 @@ LL | test = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `test`
= help: to expect this configuration use `--check-cfg=cfg(test, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:71:5
@ -200,6 +244,8 @@ LL | unix = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `unix`
= help: to expect this configuration use `--check-cfg=cfg(unix, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:73:5
@ -210,6 +256,8 @@ LL | windows = "_UNEXPECTED_VALUE",
| help: remove the value
|
= note: no expected value for `windows`
= help: to expect this configuration use `--check-cfg=cfg(windows, values("_UNEXPECTED_VALUE"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `linuz`
--> $DIR/well-known-values.rs:79:7
@ -220,6 +268,8 @@ 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`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`
= help: to expect this configuration use `--check-cfg=cfg(target_os, values("linuz"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: 25 warnings emitted