From 98f1a247de77176f605c39e225f81c6e80d93727 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 7 May 2024 16:38:34 -0700 Subject: [PATCH] Resolve unexpected_cfgs warning warning: unexpected `cfg` condition name: `limb_width_32` --> src/lexical/mod.rs:31:7 | 31 | #[cfg(limb_width_32)] | ^^^^^^^^^^^^^ | = 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(limb_width_32)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition name: `limb_width_64` --> src/lexical/mod.rs:34:7 | 34 | #[cfg(limb_width_64)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_64)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_32` --> src/lexical/large_powers.rs:5:7 | 5 | #[cfg(limb_width_32)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_32)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_64` --> src/lexical/large_powers.rs:8:7 | 8 | #[cfg(limb_width_64)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_64)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_32` --> src/lexical/math.rs:40:7 | 40 | #[cfg(limb_width_32)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_32)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_32` --> src/lexical/math.rs:43:7 | 43 | #[cfg(limb_width_32)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_32)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_32` --> src/lexical/math.rs:46:7 | 46 | #[cfg(limb_width_32)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_32)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_32` --> src/lexical/math.rs:49:7 | 49 | #[cfg(limb_width_32)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_32)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_64` --> src/lexical/math.rs:53:7 | 53 | #[cfg(limb_width_64)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_64)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_64` --> src/lexical/math.rs:56:7 | 56 | #[cfg(limb_width_64)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_64)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_64` --> src/lexical/math.rs:59:7 | 59 | #[cfg(limb_width_64)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_64)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_64` --> src/lexical/math.rs:62:7 | 62 | #[cfg(limb_width_64)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_64)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_32` --> src/lexical/math.rs:82:7 | 82 | #[cfg(limb_width_32)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_32)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_64` --> src/lexical/math.rs:89:7 | 89 | #[cfg(limb_width_64)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_64)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_32` --> src/lexical/small_powers.rs:6:7 | 6 | #[cfg(limb_width_32)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_32)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_32` --> src/lexical/small_powers.rs:12:7 | 12 | #[cfg(limb_width_32)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_32)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_64` --> src/lexical/small_powers.rs:18:7 | 18 | #[cfg(limb_width_64)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_64)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_32` --> tests/../src/lexical/mod.rs:31:7 | 31 | #[cfg(limb_width_32)] | ^^^^^^^^^^^^^ | = 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(limb_width_32)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition name: `limb_width_64` --> tests/../src/lexical/mod.rs:34:7 | 34 | #[cfg(limb_width_64)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_64)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_32` --> tests/../src/lexical/large_powers.rs:5:7 | 5 | #[cfg(limb_width_32)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_32)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_64` --> tests/../src/lexical/large_powers.rs:8:7 | 8 | #[cfg(limb_width_64)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_64)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_32` --> tests/../src/lexical/math.rs:40:7 | 40 | #[cfg(limb_width_32)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_32)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_32` --> tests/../src/lexical/math.rs:43:7 | 43 | #[cfg(limb_width_32)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_32)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_32` --> tests/../src/lexical/math.rs:46:7 | 46 | #[cfg(limb_width_32)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_32)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_32` --> tests/../src/lexical/math.rs:49:7 | 49 | #[cfg(limb_width_32)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_32)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_64` --> tests/../src/lexical/math.rs:53:7 | 53 | #[cfg(limb_width_64)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_64)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_64` --> tests/../src/lexical/math.rs:56:7 | 56 | #[cfg(limb_width_64)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_64)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_64` --> tests/../src/lexical/math.rs:59:7 | 59 | #[cfg(limb_width_64)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_64)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_64` --> tests/../src/lexical/math.rs:62:7 | 62 | #[cfg(limb_width_64)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_64)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_32` --> tests/../src/lexical/math.rs:82:7 | 82 | #[cfg(limb_width_32)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_32)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_64` --> tests/../src/lexical/math.rs:89:7 | 89 | #[cfg(limb_width_64)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_64)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_32` --> tests/../src/lexical/small_powers.rs:6:7 | 6 | #[cfg(limb_width_32)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_32)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_32` --> tests/../src/lexical/small_powers.rs:12:7 | 12 | #[cfg(limb_width_32)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_32)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_64` --> tests/../src/lexical/small_powers.rs:18:7 | 18 | #[cfg(limb_width_64)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_64)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_32` --> tests/lexical/math.rs:21:7 | 21 | #[cfg(limb_width_32)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_32)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `limb_width_64` --> tests/lexical/math.rs:26:7 | 26 | #[cfg(limb_width_64)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(limb_width_64)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration --- build.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.rs b/build.rs index dd09e62a3..433ce12c1 100644 --- a/build.rs +++ b/build.rs @@ -3,6 +3,10 @@ use std::env; fn main() { println!("cargo:rerun-if-changed=build.rs"); + println!("cargo:rustc-check-cfg=cfg(integer128)"); + println!("cargo:rustc-check-cfg=cfg(limb_width_32)"); + println!("cargo:rustc-check-cfg=cfg(limb_width_64)"); + // Decide ideal limb width for arithmetic in the float parser. Refer to // src/lexical/math.rs for where this has an effect. let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();