Skip to content

Commit 775e267

Browse files
committed
Rename "nightly" feature to "unstable"
1 parent cde791c commit 775e267

File tree

9 files changed

+38
-19
lines changed

9 files changed

+38
-19
lines changed

.travis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ matrix:
7575
rust: nightly
7676
script:
7777
- cargo bench --all
78-
- cargo bench --manifest-path futures-util/Cargo.toml --features=bench
78+
- cargo bench --manifest-path futures-util/Cargo.toml --features=bench,unstable
7979

8080
- name: cargo +stable build --no-default-features
8181
rust: stable
@@ -108,11 +108,11 @@ matrix:
108108
- cargo build --manifest-path futures/Cargo.toml
109109
--target thumbv6m-none-eabi
110110
--no-default-features
111-
--features nightly,cfg-target-has-atomic
111+
--features unstable,cfg-target-has-atomic
112112
- cargo build --manifest-path futures/Cargo.toml
113113
--target thumbv6m-none-eabi
114114
--no-default-features
115-
--features nightly,alloc,cfg-target-has-atomic
115+
--features unstable,alloc,cfg-target-has-atomic
116116

117117
- name: cargo build --target=thumbv7m-none-eabi
118118
rust: nightly
@@ -150,7 +150,7 @@ matrix:
150150
- cargo check --manifest-path futures-util/Cargo.toml --no-default-features
151151
- cargo check --manifest-path futures-util/Cargo.toml --no-default-features --features sink
152152
- cargo check --manifest-path futures-util/Cargo.toml --no-default-features --features alloc,sink
153-
- cargo check --manifest-path futures-util/Cargo.toml --no-default-features --features nightly,async-await
153+
- cargo check --manifest-path futures-util/Cargo.toml --no-default-features --features async-await
154154

155155
- name: cargo doc
156156
rust: nightly

futures-channel/Cargo.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ default = ["std"]
1919
std = ["alloc", "futures-core-preview/std"]
2020
alloc = ["futures-core-preview/alloc"]
2121
sink = ["futures-sink-preview"]
22-
nightly = ["futures-core-preview/nightly"]
22+
23+
# Unstable features
24+
# These features are outside of the normal semver guarantees and require the
25+
# `unstable` feature as an explicit opt-in to unstable API.
26+
unstable = ["futures-core-preview/unstable"]
2327
cfg-target-has-atomic = ["futures-core-preview/cfg-target-has-atomic"]
2428

2529
[dependencies]

futures-channel/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

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

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

2525
macro_rules! cfg_target_has_atomic {
2626
($($item:item)*) => {$(

futures-core/Cargo.toml

+6-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ name = "futures_core"
1717
[features]
1818
default = ["std"]
1919
std = ["alloc"]
20-
nightly = []
21-
cfg-target-has-atomic = []
2220
alloc = []
2321

22+
# Unstable features
23+
# These features are outside of the normal semver guarantees and require the
24+
# `unstable` feature as an explicit opt-in to unstable API.
25+
unstable = []
26+
cfg-target-has-atomic = []
27+
2428
[dependencies]
2529

2630
[dev-dependencies]

futures-core/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

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

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

1919
#[cfg(feature = "alloc")]
2020
extern crate alloc;

futures-util/Cargo.toml

+7-3
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,19 @@ alloc = ["futures-core-preview/alloc"]
2121
async-await = []
2222
compat = ["std", "futures_01"]
2323
io-compat = ["io", "compat", "tokio-io"]
24-
bench = []
25-
nightly = ["futures-core-preview/nightly"]
26-
cfg-target-has-atomic = ["futures-core-preview/cfg-target-has-atomic"]
2724
sink = ["futures-sink-preview"]
2825
io = ["std", "futures-io-preview", "memchr"]
2926
channel = ["std", "futures-channel-preview"]
3027
join-macro = ["async-await", "futures-join-macro-preview", "proc-macro-hack", "proc-macro-nested"]
3128
select-macro = ["async-await", "futures-select-macro-preview", "proc-macro-hack", "proc-macro-nested", "rand"]
3229

30+
# Unstable features
31+
# These features are outside of the normal semver guarantees and require the
32+
# `unstable` feature as an explicit opt-in to unstable API.
33+
unstable = ["futures-core-preview/unstable"]
34+
cfg-target-has-atomic = ["futures-core-preview/cfg-target-has-atomic"]
35+
bench = []
36+
3337
[dependencies]
3438
futures-core-preview = { path = "../futures-core", version = "=0.3.0-alpha.18", default-features = false }
3539
futures-channel-preview = { path = "../futures-channel", version = "=0.3.0-alpha.18", default-features = false, features = ["std"], optional = true }

futures-util/src/lib.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@
1313

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

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

1922
#[cfg(feature = "alloc")]
2023
extern crate alloc;

futures/Cargo.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,14 @@ assert_matches = "1.3.0"
3939
default = ["std"]
4040
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"]
4141
alloc = ["futures-core-preview/alloc", "futures-sink-preview/alloc", "futures-channel-preview/alloc", "futures-util-preview/alloc"]
42-
nightly = ["futures-core-preview/nightly", "futures-channel-preview/nightly", "futures-util-preview/nightly"]
4342
async-await = ["futures-util-preview/async-await", "futures-util-preview/join-macro", "futures-util-preview/select-macro"]
4443
compat = ["std", "futures-util-preview/compat"]
4544
io-compat = ["compat", "futures-util-preview/io-compat"]
45+
46+
# Unstable features
47+
# These features are outside of the normal semver guarantees and require the
48+
# `unstable` feature as an explicit opt-in to unstable API.
49+
unstable = ["futures-core-preview/unstable", "futures-channel-preview/unstable", "futures-util-preview/unstable"]
4650
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"]
4751

4852
[package.metadata.docs.rs]

futures/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434

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

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

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

0 commit comments

Comments
 (0)