diff --git a/tokio/build.rs b/tokio/build.rs index 2d2ec5641c0..40ee43849dc 100644 --- a/tokio/build.rs +++ b/tokio/build.rs @@ -19,12 +19,13 @@ 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 _; + #[allow(unused_imports)] #[cfg(target = "wasm32-wasi")] use std::os::wasi::prelude::AsFd as _; }