-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve unexpected_cfgs warning #1344
Conversation
warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/build/src/gen/write.rs:333:15 | 333 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `experimental-async-fn`, `parallel` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/build/src/gen/write.rs:393:15 | 393 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `experimental-async-fn`, `parallel` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/build/src/gen/write.rs:415:15 | 415 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `experimental-async-fn`, `parallel` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/build/src/syntax/attrs.rs:147:21 | 147 | && cfg!(feature = "experimental-enum-variants-from-header") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `experimental-async-fn`, `parallel` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/build/src/syntax/discriminant.rs:182:11 | 182 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `experimental-async-fn`, `parallel` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/build/src/syntax/tokens.rs:296:19 | 296 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `experimental-async-fn`, `parallel` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/build/src/syntax/types.rs:95:31 | 95 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `experimental-async-fn`, `parallel` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/build/src/syntax/mod.rs:146:11 | 146 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `experimental-async-fn`, `parallel` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/lib/src/gen/write.rs:333:15 | 333 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition | = note: no expected values for `feature` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/lib/src/gen/write.rs:393:15 | 393 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition | = note: no expected values for `feature` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/lib/src/gen/write.rs:415:15 | 415 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition | = note: no expected values for `feature` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/lib/src/syntax/attrs.rs:147:21 | 147 | && cfg!(feature = "experimental-enum-variants-from-header") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition | = note: no expected values for `feature` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/lib/src/syntax/discriminant.rs:182:11 | 182 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition | = note: no expected values for `feature` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-async-fn` --> gen/lib/src/syntax/parse.rs:565:52 | 565 | if foreign_fn.sig.asyncness.is_some() && !cfg!(feature = "experimental-async-fn") { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition | = note: no expected values for `feature` = help: consider adding `experimental-async-fn` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/lib/src/syntax/tokens.rs:296:19 | 296 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition | = note: no expected values for `feature` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/lib/src/syntax/types.rs:95:31 | 95 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition | = note: no expected values for `feature` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/lib/src/syntax/mod.rs:146:11 | 146 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition | = note: no expected values for `feature` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/cmd/src/gen/write.rs:333:15 | 333 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `experimental-async-fn` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/cmd/src/gen/write.rs:393:15 | 393 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `experimental-async-fn` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/cmd/src/gen/write.rs:415:15 | 415 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `experimental-async-fn` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/cmd/src/syntax/attrs.rs:147:21 | 147 | && cfg!(feature = "experimental-enum-variants-from-header") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `experimental-async-fn` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/cmd/src/syntax/discriminant.rs:182:11 | 182 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `experimental-async-fn` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/cmd/src/syntax/tokens.rs:296:19 | 296 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `experimental-async-fn` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/cmd/src/syntax/types.rs:95:31 | 95 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `experimental-async-fn` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header` --> gen/cmd/src/syntax/mod.rs:146:11 | 146 | #[cfg(feature = "experimental-enum-variants-from-header")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `experimental-async-fn` = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `trybuild` --> tests/ffi/build.rs:4:13 | 4 | if cfg!(trybuild) { | ^^^^^^^^ | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `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: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(trybuild)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition name: `deny_warnings` --> tests/ffi/build.rs:13:37 | 13 | build.warnings_into_errors(cfg!(deny_warnings)); | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(deny_warnings)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `deny_warnings` --> build.rs:14:36 | 14 | .warnings_into_errors(cfg!(deny_warnings)) | ^^^^^^^^^^^^^ | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `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: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(deny_warnings)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition name: `doc_cfg` --> src/lib.rs:368:13 | 368 | #![cfg_attr(doc_cfg, feature(doc_cfg))] | ^^^^^^^ | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `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: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition name: `built_with_cargo` --> src/lib.rs:409:7 | 409 | #[cfg(built_with_cargo)] | ^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(built_with_cargo)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `cxx_experimental_no_alloc` --> src/lib.rs:433:34 | 433 | #[cfg(not(any(feature = "alloc", cxx_experimental_no_alloc)))] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(cxx_experimental_no_alloc)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `compile_error_if_alloc` --> src/lib.rs:438:11 | 438 | #[cfg(all(compile_error_if_alloc, feature = "alloc"))] | ^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(compile_error_if_alloc)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `compile_error_if_std` --> src/lib.rs:443:11 | 443 | #[cfg(all(compile_error_if_std, feature = "std"))] | ^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(compile_error_if_std)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `doc_cfg` --> src/lib.rs:480:12 | 480 | #[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))] | ^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `no_core_ffi_c_char` --> src/c_char.rs:11:11 | 11 | #[cfg(not(no_core_ffi_c_char))] | ^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_core_ffi_c_char)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `no_core_ffi_c_char` --> src/c_char.rs:16:7 | 16 | #[cfg(no_core_ffi_c_char)] | ^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_core_ffi_c_char)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `doc_cfg` --> src/exception.rs:7:12 | 7 | #[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))] | ^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `doc_cfg` --> src/exception.rs:20:12 | 20 | #[cfg_attr(doc_cfg, doc(cfg(feature = "std")))] | ^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `doc_cfg` --> src/extern_type.rs:220:16 | 220 | #[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))] | ^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `doc_cfg` --> src/cxx_string.rs:151:16 | 151 | #[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))] | ^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `skip_ui_tests` --> tests/compiletest.rs:3:12 | 3 | #[cfg_attr(skip_ui_tests, ignore)] | ^^^^^^^^^^^^^ | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `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: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(skip_ui_tests)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default
Heads up, with the release of rust-lang/cargo#13913 (in nightly-2024-05-19), there is no longer any need to allow the lint to avoid a build.rs as done in this PR. Cargo has now gain the ability to declare
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(trybuild)'] }
Footnotes
|
Context: https://blog.rust-lang.org/2024/05/06/check-cfg.html