From 0f1e815e604abcbf90ab9a2f4cf6959175002c93 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Tue, 28 May 2024 18:53:17 -0700 Subject: [PATCH] bugfix: Fix check_cfg warning on nightly Signed-off-by: John Nunley --- Cargo.toml | 3 +++ src/os/unix.rs | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8452af9..1d9f4ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,9 @@ keywords = ["mio", "epoll", "kqueue", "iocp"] categories = ["asynchronous", "network-programming", "os"] exclude = ["/.*"] +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(polling_test_poll_backend)'] } + [[bench]] name = "io" harness = false diff --git a/src/os/unix.rs b/src/os/unix.rs index ffb0832..fe9fba2 100644 --- a/src/os/unix.rs +++ b/src/os/unix.rs @@ -1,6 +1,5 @@ //! Functionality that is only available for `unix` platforms. -#[cfg(not(async_io_no_io_safety))] use std::os::unix::io::BorrowedFd; /// Get a file descriptor that can be used to wait for readiness in an external runtime. @@ -41,7 +40,6 @@ use std::os::unix::io::BorrowedFd; /// # pub fn register(_: BorrowedFd<'_>) {} /// # } /// ``` -#[cfg(not(async_io_no_io_safety))] pub fn reactor_fd() -> Option> { cfg_if::cfg_if! { if #[cfg(all(