From cd159e6a1ca2a161625a5f5419ce191fe8b77ec1 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Sun, 19 May 2024 15:23:36 -0700 Subject: [PATCH] m: Use Cargo.toml lint fix instead of build.rs https://github.com/smol-rs/event-listener/pull/135#discussion_r1606080083 Signed-off-by: John Nunley --- Cargo.toml | 3 +++ build.rs | 7 ------- 2 files changed, 3 insertions(+), 7 deletions(-) delete mode 100644 build.rs diff --git a/Cargo.toml b/Cargo.toml index 3fdb37b..e81af7d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,6 +20,9 @@ std = ["concurrent-queue/std", "parking"] portable-atomic = ["portable-atomic-util", "portable_atomic_crate"] loom = ["concurrent-queue/loom", "parking?/loom", "dep:loom"] +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(loom)'] } + [dependencies] concurrent-queue = { version = "2.4.0", default-features = false } pin-project-lite = "0.2.12" diff --git a/build.rs b/build.rs deleted file mode 100644 index c689ca8..0000000 --- a/build.rs +++ /dev/null @@ -1,7 +0,0 @@ -//! Emits the necessary "checked" compile time flag warning for "loom". -//! -//! Without this, the compiler complains about the unspecified "loom" flag. - -fn main() { - println!("cargo:rustc-check-cfg=cfg(loom)"); -}