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 _; } "#;