Skip to content

Commit f31a92a

Browse files
Nemo157cramertj
authored andcommitted
Fix missed feature usage
1 parent 4aeca50 commit f31a92a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

futures/src/lib.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,17 @@
2222
//! completion, but *do not block* the thread running them.
2323
2424
#![feature(futures_api)]
25+
#![cfg_attr(feature = "cfg-target-has-atomic", feature(cfg_target_has_atomic))]
2526

2627
#![cfg_attr(not(feature = "std"), no_std)]
2728

2829
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
2930

3031
#![doc(html_root_url = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.12/futures")]
3132

33+
#[cfg(all(feature = "cfg-target-has-atomic", not(feature = "nightly")))]
34+
compile_error!("The `cfg-target-has-atomic` feature requires the `nightly` feature as an explicit opt-in to unstable features");
35+
3236
#[doc(hidden)] pub use futures_util::core_reexport;
3337

3438
#[doc(hidden)] pub use futures_core::future::Future;
@@ -376,7 +380,7 @@ pub mod task {
376380
};
377381

378382
#[cfg_attr(
379-
feature = "nightly",
383+
feature = "target-has-atomic",
380384
cfg(all(target_has_atomic = "cas", target_has_atomic = "ptr"))
381385
)]
382386
pub use futures_util::task::AtomicWaker;

0 commit comments

Comments
 (0)