Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions static-alloc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ all-features = true

[dependencies]
alloc-traits = { path = "../alloc-traits", version = "0.1.0" }
atomic-polyfill = { version = "1", optional = true }
portable-atomic = { version = "1", optional = true, default-features = false }

[features]
alloc = []
Expand All @@ -25,9 +25,9 @@ nightly_try_reserve = []
# Enables the `unsync::Chain` module. Note that this is explicitly outside the
# SemVer stability guarantees!
nightly_chain = ["alloc"]
# Enables the use of the `atomic-polyfill` crate to support targets without
# Enables the use of the `portable-atomic` crate to support targets without
# native atomic CAS operations
polyfill = ["atomic-polyfill"]
polyfill = ["portable-atomic"]

# Tests that test `Bump` as GlobalAlloc. Must be in a separate test each.
[[test]]
Expand Down
2 changes: 1 addition & 1 deletion static-alloc/src/bump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use core::ptr::{null_mut, NonNull};
use core::sync::atomic::{AtomicUsize, Ordering};

#[cfg(feature = "polyfill")]
use atomic_polyfill::{AtomicUsize, Ordering};
use portable_atomic::{AtomicUsize, Ordering};

use crate::leaked::LeakBox;
use alloc_traits::{AllocTime, LocalAlloc, NonZeroLayout};
Expand Down