Skip to content

Commit d3a8a25

Browse files
committed
Upgrade allocator-api2 dependency
1 parent 7163e53 commit d3a8a25

2 files changed

Lines changed: 2 additions & 20 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,15 @@ all-features = true
2020
[features]
2121
default = ["std"]
2222
std = ["allocator-api2/std", "thiserror/std"]
23-
nightly_allocator_api = ["allocator-api2/nightly"]
2423
nightly_core_intrinsics = []
2524
nightly = [
26-
"nightly_allocator_api",
2725
"nightly_core_intrinsics",
2826
]
2927
# required features to run tests; additional features enable more tests
3028
dev = ["std"]
3129

3230
[dependencies]
33-
allocator-api2 = { version = "0.2", default-features = false }
31+
allocator-api2 = { version = "0.4", default-features = false }
3432
cfg-if = "1.0"
3533
mirai-annotations = "1.12"
3634
thiserror = { version = "2", default-features = false }

src/lib.rs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// https://github.com/rust-lang/rust/issues/32838
2-
#![cfg_attr(feature = "nightly_allocator_api", feature(allocator_api))]
31
// for `volatile_memset`
42
#![cfg_attr(feature = "nightly_core_intrinsics", feature(core_intrinsics))]
53
#![cfg_attr(not(feature = "std"), no_std)]
@@ -23,8 +21,6 @@
2321
//! visible on the prompt; it is only to give an idea of how to use this crate.
2422
//!
2523
//! ```
26-
//! #![feature(allocator_api)]
27-
//! // requires `nightly_allocator_api` crate feature to be enabled and a nightly compiler
2824
//! use secmem_alloc::allocator_api::{Allocator, Global, Vec};
2925
//! use secmem_alloc::zeroizing_alloc::ZeroizeAlloc;
3026
//!
@@ -52,10 +48,6 @@
5248
//! written to swap.
5349
//!
5450
//! ```
55-
//! // requires no crate features and works on stable
56-
//! // if you enable the `nightly_allocator_api` crate feature, the following line is necessary
57-
//! #![feature(allocator_api)]
58-
//!
5951
//! use secmem_alloc::allocator_api::{Allocator, Box};
6052
//! use secmem_alloc::sec_alloc::SecStackSinglePageAlloc;
6153
//!
@@ -81,12 +73,6 @@
8173
//! - `std` (default): Enable functionality that requires `std`. Currently only
8274
//! required for `Error` implements and required for tests. This feature is
8375
//! enabled by default.
84-
//! - `nightly_allocator_api` (requires nightly): Use the nightly allocator api
85-
//! from the standard library (actually the `core` crate), gated behind the
86-
//! nightly-only feature `allocator_api`. When disabled, a copy of the
87-
//! allocator api included in this crate, available through
88-
//! `secmem_alloc::allocator_api`, will be used. This feature requires a
89-
//! nightly compiler.
9076
//! - `nightly_core_intrinsics` (requires nightly): Use the intrinsics from the
9177
//! standard library (actually the `core` crate), gated behind the
9278
//! nightly-only feature `core_intrinsics`. This allows for a slightly faster
@@ -95,9 +81,7 @@
9581
//! - `nightly` (requires nightly): Enable all nightly-only features (i.e. the
9682
//! above two). Enabling this feature is highly recommended when a nightly
9783
//! compiler is available. This feature requires a nightly compiler.
98-
//! - `dev` (requires nightly): This feature enables all features required to
99-
//! run the test-suite, and should only be enabled for that purpose. This
100-
//! feature currently requires a nightly compiler.
84+
//! - `dev`: Used internally for running tests.
10185
//!
10286
//!
10387
//! # MSRV Policy

0 commit comments

Comments
 (0)