From f2d033e4541d3e814e19b19ddd8a07ff1302ddbb Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Tue, 9 May 2023 21:57:35 +0200 Subject: [PATCH] build: fix warnings in AS_FD_PROBE (#5677) --- tokio/build.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tokio/build.rs b/tokio/build.rs index 2d2ec5641c0..b8234dde9a0 100644 --- a/tokio/build.rs +++ b/tokio/build.rs @@ -19,13 +19,14 @@ const CONST_MUTEX_NEW_PROBE: &str = r#" const AS_FD_PROBE: &str = r#" { - #![allow(unused_imports)] - + #[allow(unused_imports)] #[cfg(unix)] use std::os::unix::prelude::AsFd as _; + #[allow(unused_imports)] #[cfg(windows)] use std::os::windows::prelude::AsSocket as _; - #[cfg(target = "wasm32-wasi")] + #[allow(unused_imports)] + #[cfg(target_os = "wasi")] use std::os::wasi::prelude::AsFd as _; } "#;