From 02831d640ef82ea89b0b53263c2c99a018db7049 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Tue, 9 May 2023 17:02:25 +0200 Subject: [PATCH] tokio: fix warnings in AS_FD_PROBE --- 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 _; } "#;