From a9a6c38d6963ecc4adb6a181503d50058e3c4274 Mon Sep 17 00:00:00 2001 From: malezjaa Date: Wed, 12 Aug 2026 16:58:01 +0200 Subject: [PATCH] Use portable-atomic for polyfill support --- static-alloc/Cargo.toml | 6 +++--- static-alloc/src/bump.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/static-alloc/Cargo.toml b/static-alloc/Cargo.toml index 0a2449f..95384df 100644 --- a/static-alloc/Cargo.toml +++ b/static-alloc/Cargo.toml @@ -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 = [] @@ -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]] diff --git a/static-alloc/src/bump.rs b/static-alloc/src/bump.rs index df48785..6e00140 100644 --- a/static-alloc/src/bump.rs +++ b/static-alloc/src/bump.rs @@ -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};