Emit a compiler error with futures 0.3 and atomics

Not implemented yet, and the one there doesn't work with atomics! (we'll
get around to this soon-ish)
This commit is contained in:
Alex Crichton 2019-07-18 10:13:05 -07:00
parent 02be3690cf
commit d122bbca13

View File

@ -109,22 +109,24 @@ use cfg_if::cfg_if;
cfg_if! {
if #[cfg(target_feature = "atomics")] {
/// Contains a thread-safe version of this crate, with Futures 0.1
pub mod atomics;
mod atomics;
/// Polyfill for `Atomics.waitAsync` function
mod polyfill;
pub use atomics::*;
} else if #[cfg(feature = "futures_0_3")] {
/// Contains a Futures 0.3 implementation of this crate.
pub mod futures_0_3;
/// Contains stable version of the crate
pub mod stable;
pub use stable::*;
} else {
/// Contains stable version of the crate
pub mod stable;
} else {
mod stable;
pub use stable::*;
}
}
#[cfg(feature = "futures_0_3")]
cfg_if! {
if #[cfg(target_feature = "atomics")] {
compile_error!("futures 0.3 support is not implemented with atomics yet");
} else {
/// Contains a Futures 0.3 implementation of this crate.
pub mod futures_0_3;
}
}