fix: Change feature name no-std to alloc

split-by-pattern
k-nasa 5 years ago
parent 22d929d481
commit 7efe7caf66

@ -58,7 +58,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features --features no-std
args: --no-default-features --features alloc
- name: check attributes
uses: actions-rs/cargo@v1

@ -44,9 +44,9 @@ std = [
"once_cell",
"pin-utils",
"slab",
"no-std",
"alloc",
]
no-std = [
alloc = [
"futures-core",
"pin-project-lite",
]

@ -46,7 +46,7 @@
//! [`Future::race`]: trait.Future.html#method.race
//! [`Future::try_race`]: trait.Future.html#method.try_race
cfg_no_std! {
cfg_alloc! {
pub use future::Future;
pub(crate) mod future;
}

@ -241,7 +241,7 @@ pub use async_attributes::{main, test};
#[cfg(feature = "std")]
mod macros;
cfg_no_std! {
cfg_alloc! {
pub mod task;
pub mod future;
pub mod stream;

@ -117,7 +117,7 @@
//! [`task_local!`]: ../macro.task_local.html
//! [`with`]: struct.LocalKey.html#method.with
cfg_no_std! {
cfg_alloc! {
#[doc(inline)]
pub use core::task::{Context, Poll, Waker};
pub use ready::ready;

@ -1,7 +1,7 @@
#[cfg(feature = "no-std")]
#[cfg(feature = "alloc")]
extern crate alloc;
#[cfg(feature = "no-std")]
#[cfg(feature = "alloc")]
use alloc::string::String;
/// Calls a function and aborts if it panics.
@ -173,10 +173,10 @@ macro_rules! cfg_std {
/// Declares no-std items.
#[allow(unused_macros)]
#[doc(hidden)]
macro_rules! cfg_no_std {
macro_rules! cfg_alloc {
($($item:item)*) => {
$(
#[cfg(feature = "no-std")]
#[cfg(feature = "alloc")]
$item
)*
}

Loading…
Cancel
Save