Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename "nightly" feature to "unstable" #1823

Merged
merged 1 commit into from Aug 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions .travis.yml
Expand Up @@ -75,7 +75,7 @@ matrix:
rust: nightly
script:
- cargo bench --all
- cargo bench --manifest-path futures-util/Cargo.toml --features=bench
- cargo bench --manifest-path futures-util/Cargo.toml --features=bench,unstable

- name: cargo +stable build --no-default-features
rust: stable
Expand Down Expand Up @@ -108,11 +108,11 @@ matrix:
- cargo build --manifest-path futures/Cargo.toml
--target thumbv6m-none-eabi
--no-default-features
--features nightly,cfg-target-has-atomic
--features unstable,cfg-target-has-atomic
- cargo build --manifest-path futures/Cargo.toml
--target thumbv6m-none-eabi
--no-default-features
--features nightly,alloc,cfg-target-has-atomic
--features unstable,alloc,cfg-target-has-atomic

- name: cargo build --target=thumbv7m-none-eabi
rust: nightly
Expand Down Expand Up @@ -150,7 +150,7 @@ matrix:
- cargo check --manifest-path futures-util/Cargo.toml --no-default-features
- cargo check --manifest-path futures-util/Cargo.toml --no-default-features --features sink
- cargo check --manifest-path futures-util/Cargo.toml --no-default-features --features alloc,sink
- cargo check --manifest-path futures-util/Cargo.toml --no-default-features --features nightly,async-await
- cargo check --manifest-path futures-util/Cargo.toml --no-default-features --features async-await

- name: cargo doc
rust: nightly
Expand Down
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 = []
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"bench" feature is a feature for exposing BiLock, but it is not a stable public API and should be included here.

Related: #1679

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Maybe this should be renamed to bilock.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed #1827


[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
7 changes: 5 additions & 2 deletions futures-util/src/lib.rs
Expand Up @@ -13,8 +13,11 @@

#![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(all(feature = "bench", not(feature = "unstable")))]
compile_error!("The `bench` 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