Resolve unexpected_cfgs warning
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
diff --git a/build.rs b/build.rs
index a6c89cc..ba43c7a 100644
--- a/build.rs
+++ b/build.rs
@@ -1,3 +1,6 @@
+#![allow(unknown_lints)]
+#![allow(unexpected_cfgs)]
+
use std::env;
use std::path::{Path, PathBuf};
use std::process::Command;
@@ -24,6 +27,16 @@
}
if let Some(rustc) = rustc_version() {
+ if rustc.minor >= 80 {
+ println!("cargo:rustc-check-cfg=cfg(built_with_cargo)");
+ println!("cargo:rustc-check-cfg=cfg(compile_error_if_alloc)");
+ println!("cargo:rustc-check-cfg=cfg(compile_error_if_std)");
+ println!("cargo:rustc-check-cfg=cfg(cxx_experimental_no_alloc)");
+ println!("cargo:rustc-check-cfg=cfg(doc_cfg)");
+ println!("cargo:rustc-check-cfg=cfg(no_core_ffi_c_char)");
+ println!("cargo:rustc-check-cfg=cfg(skip_ui_tests)");
+ }
+
if rustc.minor < 63 {
println!("cargo:warning=The cxx crate requires a rustc version 1.63.0 or newer.");
println!(
diff --git a/tests/ffi/build.rs b/tests/ffi/build.rs
index 7051cf0..98f9af5 100644
--- a/tests/ffi/build.rs
+++ b/tests/ffi/build.rs
@@ -1,3 +1,6 @@
+#![allow(unknown_lints)]
+#![allow(unexpected_cfgs)]
+
use cxx_build::CFG;
fn main() {
diff --git a/tools/cargo/build.rs b/tools/cargo/build.rs
index 401c741..4034ec8 100644
--- a/tools/cargo/build.rs
+++ b/tools/cargo/build.rs
@@ -48,6 +48,9 @@
";
fn main() {
+ println!("cargo:rustc-check-cfg=cfg(feature, values(\"experimental-async-fn\"))");
+ println!("cargo:rustc-check-cfg=cfg(feature, values(\"experimental-enum-variants-from-header\"))");
+
if Path::new("src/syntax/mod.rs").exists() {
return;
}