From f78001c1a99ea9106d77b02e978c093f2ea3835b Mon Sep 17 00:00:00 2001 From: Taylor Cramer Date: Thu, 18 Oct 2018 18:59:08 -0700 Subject: [PATCH] no_std only when std feature is not enabled --- futures-channel/src/lib.rs | 2 +- futures-core/src/lib.rs | 2 +- futures-io/src/lib.rs | 2 +- futures-sink/src/lib.rs | 2 +- futures/src/lib.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/futures-channel/src/lib.rs b/futures-channel/src/lib.rs index 7a32ff29d9..e794741b7f 100644 --- a/futures-channel/src/lib.rs +++ b/futures-channel/src/lib.rs @@ -5,7 +5,7 @@ #![feature(pin, arbitrary_self_types, futures_api)] -#![no_std] +#![cfg_attr(not(feature = "std"), no_std)] #![warn(missing_docs, missing_debug_implementations)] #![deny(bare_trait_objects)] diff --git a/futures-core/src/lib.rs b/futures-core/src/lib.rs index d693010142..3c611d380f 100644 --- a/futures-core/src/lib.rs +++ b/futures-core/src/lib.rs @@ -2,7 +2,7 @@ #![feature(pin, arbitrary_self_types, futures_api)] -#![no_std] +#![cfg_attr(not(feature = "std"), no_std)] #![warn(missing_docs, missing_debug_implementations)] #![deny(bare_trait_objects)] diff --git a/futures-io/src/lib.rs b/futures-io/src/lib.rs index 143be1b6c8..825a405f13 100644 --- a/futures-io/src/lib.rs +++ b/futures-io/src/lib.rs @@ -4,7 +4,7 @@ //! asynchronous analogs to `std::io::{Read, Write}`. The primary difference is //! that these traits integrate with the asynchronous task system. -#![no_std] +#![cfg_attr(not(feature = "std"), no_std)] #![warn(missing_docs, missing_debug_implementations)] #![deny(bare_trait_objects)] diff --git a/futures-sink/src/lib.rs b/futures-sink/src/lib.rs index f1da1617e2..1d04557330 100644 --- a/futures-sink/src/lib.rs +++ b/futures-sink/src/lib.rs @@ -3,7 +3,7 @@ //! This crate contains the `Sink` trait which allows values to be sent //! asynchronously. -#![no_std] +#![cfg_attr(not(feature = "std"), no_std)] #![warn(missing_docs, missing_debug_implementations)] #![doc(html_root_url = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.8/futures_sink")] diff --git a/futures/src/lib.rs b/futures/src/lib.rs index 9be2c98634..6cb09c49bf 100644 --- a/futures/src/lib.rs +++ b/futures/src/lib.rs @@ -23,7 +23,7 @@ #![feature(pin, arbitrary_self_types, futures_api)] -#![no_std] +#![cfg_attr(not(feature = "std"), no_std)] #![warn(missing_docs, missing_debug_implementations)] #![deny(bare_trait_objects)]