From 25e90945ee080abadc9d070addc5719a05db983b Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Wed, 19 Jun 2024 06:34:16 -0700 Subject: [PATCH] Leftover nightly fixes (#5077) The displaydoc warnings need https://github.com/yaahc/displaydoc/pull/47, but I don't think they break non-clippy CI for us, and I'm working on getting that published. --- ffi/freertos/Cargo.toml | 3 +++ ffi/freertos/build.rs | 3 ++- provider/datagen/src/lib.rs | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ffi/freertos/Cargo.toml b/ffi/freertos/Cargo.toml index cd04729a92a..dab18d2aed8 100644 --- a/ffi/freertos/Cargo.toml +++ b/ffi/freertos/Cargo.toml @@ -43,3 +43,6 @@ default = ["icu_capi/default_components"] [build-dependencies] rustc_version = "0.4" + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(needs_alloc_error_handler)'] } diff --git a/ffi/freertos/build.rs b/ffi/freertos/build.rs index ea8f9695687..91571dbdae9 100644 --- a/ffi/freertos/build.rs +++ b/ffi/freertos/build.rs @@ -27,12 +27,13 @@ fn needs_alloc_error_handler() -> Option { } fn main() { + println!("cargo:rustc-check-cfg=cfg(needs_alloc_error_handler)"); + match env::var("CARGO_CFG_TARGET_OS") { Ok(v) if v == "none" => (), // Only on target_os = none _ => return, }; - if let Some(true) = needs_alloc_error_handler() { println!("cargo:rustc-cfg=needs_alloc_error_handler"); } diff --git a/provider/datagen/src/lib.rs b/provider/datagen/src/lib.rs index b7b4d200e34..d55b4d45069 100644 --- a/provider/datagen/src/lib.rs +++ b/provider/datagen/src/lib.rs @@ -130,7 +130,7 @@ macro_rules! cb { /// corresponding Cargo features has been enabled. // Excludes the hello world marker, as that generally should not be generated. pub fn all_markers() -> Vec { - #[cfg(features = "experimental_components")] + #[cfg(feature = "experimental_components")] log::warn!("The icu_datagen crates has been built with the `experimental_components` feature, so `all_markers` returns experimental markers"); vec![ $(