From e5860e95c90de4a07f2e3176679e4f309af595b1 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 28 Nov 2022 06:48:19 -0800 Subject: [PATCH] Disable the contents of this crate on unknown platforms. (#55) Add `#![cfg(any(unix, windows, target_os = "wasi"))]` to the top-level lib.rs so that io-lifetimes can appear as a dependency on platforms even when it doesn't have support for them. --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index da5e740..d779541 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -30,6 +30,8 @@ #![deny(missing_docs)] // Work around https://github.com/rust-lang/rust/issues/103306. #![cfg_attr(all(wasi_ext, target_os = "wasi"), feature(wasi_ext))] +// Currently supported platforms. +#![cfg(any(unix, windows, target_os = "wasi"))] mod portability; mod traits;