diff --git a/.travis.yml b/.travis.yml index 6ddcb3e5a4..396b5f7b18 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,11 +16,10 @@ matrix: - cargo build --manifest-path futures-executor/Cargo.toml --no-default-features - cargo build --manifest-path futures-sink/Cargo.toml --no-default-features - cargo build --manifest-path futures-util/Cargo.toml --no-default-features - # - rust: nightly - # script: - # - rustup component add rust-src - # - cargo install xargo - # - xargo build --manifest-path futures/Cargo.toml --target thumbv6m-none-eabi --no-default-features + - rust: nightly + script: + - rustup target add thumbv6m-none-eabi + - cargo build --manifest-path futures/Cargo.toml --target thumbv6m-none-eabi --no-default-features --features nightly # - rust: 1.20.0 # script: cargo test --all # - rust: nightly diff --git a/futures-core/src/lib.rs b/futures-core/src/lib.rs index 136ca069d1..fa9e7f26c9 100644 --- a/futures-core/src/lib.rs +++ b/futures-core/src/lib.rs @@ -9,8 +9,6 @@ #![doc(html_root_url = "https://docs.rs/futures-core/0.3.0-alpha")] -#![cfg_attr(feature = "nightly", feature(cfg_target_has_atomic))] - #[cfg(feature = "std")] extern crate std; diff --git a/futures-util/src/lib.rs b/futures-util/src/lib.rs index 3f263507b5..c323930767 100644 --- a/futures-util/src/lib.rs +++ b/futures-util/src/lib.rs @@ -2,6 +2,7 @@ //! and the `AsyncRead` and `AsyncWrite` traits. #![feature(async_await, await_macro, pin, arbitrary_self_types, futures_api)] +#![cfg_attr(feature = "nightly", feature(cfg_target_has_atomic))] #![cfg_attr(not(feature = "std"), no_std)] #![deny(missing_docs, missing_debug_implementations, warnings)] diff --git a/futures-util/src/task/mod.rs b/futures-util/src/task/mod.rs index f6e7f79fac..a1df2c3999 100644 --- a/futures-util/src/task/mod.rs +++ b/futures-util/src/task/mod.rs @@ -3,7 +3,13 @@ mod context; pub use self::context::ContextExt; -#[cfg_attr(feature = "nightly", cfg(target_has_atomic = "ptr"))] +#[cfg_attr( + feature = "nightly", + cfg(all(target_has_atomic = "cas", target_has_atomic = "ptr")) +)] mod atomic_waker; -#[cfg_attr(feature = "nightly", cfg(target_has_atomic = "ptr"))] +#[cfg_attr( + feature = "nightly", + cfg(all(target_has_atomic = "cas", target_has_atomic = "ptr")) +)] pub use self::atomic_waker::AtomicWaker; diff --git a/futures/src/lib.rs b/futures/src/lib.rs index f409e44985..e628ce4efe 100644 --- a/futures/src/lib.rs +++ b/futures/src/lib.rs @@ -339,7 +339,10 @@ pub mod task { pub use futures_util::task::ContextExt; - #[cfg_attr(feature = "nightly", cfg(target_has_atomic = "ptr"))] + #[cfg_attr( + feature = "nightly", + cfg(all(target_has_atomic = "cas", target_has_atomic = "ptr")) + )] pub use futures_util::task::AtomicWaker; #[cfg(feature = "std")]