Skip to content

Commit

Permalink
Rename "nightly" feature to "unstable"
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Aug 23, 2019
1 parent cde791c commit b48022b
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 15 deletions.
6 changes: 5 additions & 1 deletion futures-channel/Cargo.toml
Expand Up @@ -19,7 +19,11 @@ default = ["std"]
std = ["alloc", "futures-core-preview/std"]
alloc = ["futures-core-preview/alloc"]
sink = ["futures-sink-preview"]
nightly = ["futures-core-preview/nightly"]

# Unstable features
# These features are outside of the normal semver guarantees and require the
# `unstable` feature as an explicit opt-in to unstable API.
unstable = ["futures-core-preview/unstable"]
cfg-target-has-atomic = ["futures-core-preview/cfg-target-has-atomic"]

[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions futures-channel/src/lib.rs
Expand Up @@ -19,8 +19,8 @@

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

#[cfg(all(feature = "cfg-target-has-atomic", not(feature = "nightly")))]
compile_error!("The `cfg-target-has-atomic` feature requires the `nightly` feature as an explicit opt-in to unstable features");
#[cfg(all(feature = "cfg-target-has-atomic", not(feature = "unstable")))]
compile_error!("The `cfg-target-has-atomic` feature requires the `unstable` feature as an explicit opt-in to unstable features");

macro_rules! cfg_target_has_atomic {
($($item:item)*) => {$(
Expand Down
8 changes: 6 additions & 2 deletions futures-core/Cargo.toml
Expand Up @@ -17,10 +17,14 @@ name = "futures_core"
[features]
default = ["std"]
std = ["alloc"]
nightly = []
cfg-target-has-atomic = []
alloc = []

# Unstable features
# These features are outside of the normal semver guarantees and require the
# `unstable` feature as an explicit opt-in to unstable API.
unstable = []
cfg-target-has-atomic = []

[dependencies]

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions futures-core/src/lib.rs
Expand Up @@ -13,8 +13,8 @@

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

#[cfg(all(feature = "cfg-target-has-atomic", not(feature = "nightly")))]
compile_error!("The `cfg-target-has-atomic` feature requires the `nightly` feature as an explicit opt-in to unstable features");
#[cfg(all(feature = "cfg-target-has-atomic", not(feature = "unstable")))]
compile_error!("The `cfg-target-has-atomic` feature requires the `unstable` feature as an explicit opt-in to unstable features");

#[cfg(feature = "alloc")]
extern crate alloc;
Expand Down
10 changes: 7 additions & 3 deletions futures-util/Cargo.toml
Expand Up @@ -21,15 +21,19 @@ alloc = ["futures-core-preview/alloc"]
async-await = []
compat = ["std", "futures_01"]
io-compat = ["io", "compat", "tokio-io"]
bench = []
nightly = ["futures-core-preview/nightly"]
cfg-target-has-atomic = ["futures-core-preview/cfg-target-has-atomic"]
sink = ["futures-sink-preview"]
io = ["std", "futures-io-preview", "memchr"]
channel = ["std", "futures-channel-preview"]
join-macro = ["async-await", "futures-join-macro-preview", "proc-macro-hack", "proc-macro-nested"]
select-macro = ["async-await", "futures-select-macro-preview", "proc-macro-hack", "proc-macro-nested", "rand"]

# Unstable features
# These features are outside of the normal semver guarantees and require the
# `unstable` feature as an explicit opt-in to unstable API.
unstable = ["futures-core-preview/unstable"]
cfg-target-has-atomic = ["futures-core-preview/cfg-target-has-atomic"]
bench = []

[dependencies]
futures-core-preview = { path = "../futures-core", version = "=0.3.0-alpha.18", default-features = false }
futures-channel-preview = { path = "../futures-channel", version = "=0.3.0-alpha.18", default-features = false, features = ["std"], optional = true }
Expand Down
4 changes: 2 additions & 2 deletions futures-util/src/lib.rs
Expand Up @@ -13,8 +13,8 @@

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

#[cfg(all(feature = "cfg-target-has-atomic", not(feature = "nightly")))]
compile_error!("The `cfg-target-has-atomic` feature requires the `nightly` feature as an explicit opt-in to unstable features");
#[cfg(all(feature = "cfg-target-has-atomic", not(feature = "unstable")))]
compile_error!("The `cfg-target-has-atomic` feature requires the `unstable` feature as an explicit opt-in to unstable features");

#[cfg(feature = "alloc")]
extern crate alloc;
Expand Down
6 changes: 5 additions & 1 deletion futures/Cargo.toml
Expand Up @@ -39,10 +39,14 @@ assert_matches = "1.3.0"
default = ["std"]
std = ["alloc", "futures-core-preview/std", "futures-executor-preview/std", "futures-io-preview/std", "futures-sink-preview/std", "futures-util-preview/std", "futures-util-preview/io", "futures-util-preview/channel"]
alloc = ["futures-core-preview/alloc", "futures-sink-preview/alloc", "futures-channel-preview/alloc", "futures-util-preview/alloc"]
nightly = ["futures-core-preview/nightly", "futures-channel-preview/nightly", "futures-util-preview/nightly"]
async-await = ["futures-util-preview/async-await", "futures-util-preview/join-macro", "futures-util-preview/select-macro"]
compat = ["std", "futures-util-preview/compat"]
io-compat = ["compat", "futures-util-preview/io-compat"]

# Unstable features
# These features are outside of the normal semver guarantees and require the
# `unstable` feature as an explicit opt-in to unstable API.
unstable = ["futures-core-preview/unstable", "futures-channel-preview/unstable", "futures-util-preview/unstable"]
cfg-target-has-atomic = ["futures-core-preview/cfg-target-has-atomic", "futures-channel-preview/cfg-target-has-atomic", "futures-util-preview/cfg-target-has-atomic"]

[package.metadata.docs.rs]
Expand Down
4 changes: 2 additions & 2 deletions futures/src/lib.rs
Expand Up @@ -34,8 +34,8 @@

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

#[cfg(all(feature = "cfg-target-has-atomic", not(feature = "nightly")))]
compile_error!("The `cfg-target-has-atomic` feature requires the `nightly` feature as an explicit opt-in to unstable features");
#[cfg(all(feature = "cfg-target-has-atomic", not(feature = "unstable")))]
compile_error!("The `cfg-target-has-atomic` feature requires the `unstable` feature as an explicit opt-in to unstable features");

#[doc(hidden)] pub use futures_core::core_reexport;

Expand Down

0 comments on commit b48022b

Please sign in to comment.