Skip to content

Commit cfaa732

Browse files
committed
Stabilize alloc feature
1 parent 2425818 commit cfaa732

File tree

6 files changed

+5
-27
lines changed

6 files changed

+5
-27
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ matrix:
2525

2626
# When updating this, the reminder to update the minimum required version in README.md.
2727
- name: cargo test (minimum required version)
28-
rust: nightly-2019-04-13
28+
rust: nightly-2019-04-14
2929

3030
- name: cargo clippy
3131
rust: nightly

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Now, you can use futures-rs:
3939
use futures::future::Future; // Note: It's not `futures_preview`
4040
```
4141

42-
The current version of futures-rs requires Rust nightly 2019-02-15 or later.
42+
The current version of futures-rs requires Rust nightly 2019-04-14 or later.
4343

4444
### Feature `std`
4545

futures-core/src/lib.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
33
#![feature(futures_api)]
44
#![cfg_attr(feature = "cfg-target-has-atomic", feature(cfg_target_has_atomic))]
5-
#![cfg_attr(all(feature = "alloc", not(feature = "std")), feature(alloc))]
65

76
#![cfg_attr(not(feature = "std"), no_std)]
87

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

16-
#[cfg(all(feature = "alloc", not(any(feature = "std", feature = "nightly"))))]
17-
compile_error!("The `alloc` feature without `std` requires the `nightly` feature active to explicitly opt-in to unstable features");
18-
19-
#[cfg(all(feature = "alloc", not(feature = "std")))]
15+
#[cfg(feature = "alloc")]
2016
extern crate alloc;
21-
#[cfg(feature = "std")]
22-
extern crate std as alloc;
2317

2418
pub mod future;
2519
#[doc(hidden)] pub use self::future::{Future, FusedFuture, TryFuture};

futures-sink/src/lib.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,9 @@
88
#![doc(html_root_url = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.13/futures_sink")]
99

1010
#![feature(futures_api)]
11-
#![cfg_attr(all(feature = "alloc", not(feature = "std")), feature(alloc))]
1211

13-
#[cfg(all(feature = "alloc", not(any(feature = "std", feature = "nightly"))))]
14-
compile_error!("The `alloc` feature without `std` requires the `nightly` feature active to explicitly opt-in to unstable features");
15-
16-
#[cfg(all(feature = "alloc", not(feature = "std")))]
12+
#[cfg(feature = "alloc")]
1713
extern crate alloc;
18-
#[cfg(feature = "std")]
19-
extern crate std as alloc;
2014

2115
use futures_core::task::{Context, Poll};
2216
use core::pin::Pin;

futures-util/src/lib.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![cfg_attr(feature = "alloc", feature(box_into_pin))]
66
#![cfg_attr(feature = "std", feature(async_await, await_macro))]
77
#![cfg_attr(feature = "cfg-target-has-atomic", feature(cfg_target_has_atomic))]
8-
#![cfg_attr(all(feature = "alloc", not(feature = "std")), feature(alloc))]
98

109
#![cfg_attr(not(feature = "std"), no_std)]
1110
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
@@ -15,13 +14,8 @@
1514
#[cfg(all(feature = "cfg-target-has-atomic", not(feature = "nightly")))]
1615
compile_error!("The `cfg-target-has-atomic` feature requires the `nightly` feature as an explicit opt-in to unstable features");
1716

18-
#[cfg(all(feature = "alloc", not(any(feature = "std", feature = "nightly"))))]
19-
compile_error!("The `alloc` feature without `std` requires the `nightly` feature active to explicitly opt-in to unstable features");
20-
21-
#[cfg(all(feature = "alloc", not(feature = "std")))]
17+
#[cfg(feature = "alloc")]
2218
extern crate alloc;
23-
#[cfg(feature = "std")]
24-
extern crate std as alloc;
2519

2620
#[macro_use]
2721
mod macros;

futures/src/lib.rs

-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
2424
#![feature(futures_api)]
2525
#![cfg_attr(feature = "cfg-target-has-atomic", feature(cfg_target_has_atomic))]
26-
#![cfg_attr(all(feature = "alloc", not(feature = "std")), feature(alloc))]
2726

2827
#![cfg_attr(not(feature = "std"), no_std)]
2928

@@ -34,9 +33,6 @@
3433
#[cfg(all(feature = "cfg-target-has-atomic", not(feature = "nightly")))]
3534
compile_error!("The `cfg-target-has-atomic` feature requires the `nightly` feature as an explicit opt-in to unstable features");
3635

37-
#[cfg(all(feature = "alloc", not(any(feature = "std", feature = "nightly"))))]
38-
compile_error!("The `alloc` feature without `std` requires the `nightly` feature active to explicitly opt-in to unstable features");
39-
4036
#[doc(hidden)] pub use futures_util::core_reexport;
4137

4238
#[doc(hidden)] pub use futures_core::future::Future;

0 commit comments

Comments
 (0)