Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Commit 671a7c7

Browse files
committed
1 parent a8305f4 commit 671a7c7

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ Changes regarding the current `Alloc` trait
4747
unlocks the possibility to move the extension API like `alloc_array` into a separate trait.
4848

4949
Issue: [rust-lang/wg-allocators#16](https://github.com/rust-lang/wg-allocators/issues/16)
50-
50+
51+
- Support reallocating to a different alignment.
52+
53+
Issue: [rust-lang/wg-allocators#5](https://github.com/rust-lang/wg-allocators/issues/5)
54+
5155
Currently associated containers
5256
-------------------------------
5357

src/boxed.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@
6060
//!
6161
//! For non-zero-sized values, a [`Box`] will use the [`Global`] allocator for its allocation if no
6262
//! allocator was specified. It is valid to convert both ways between a [`Box`] and a raw pointer
63-
//! allocated with the same allocator, given that the [`Layout`] used with the allocator is
63+
//! allocated with the same allocator, given that the [`NonZeroLayout`] used with the allocator is
6464
//! correct for the type. More precisely, a `value: *mut T` that has been allocated with the
6565
//! [`Global`] allocator with `Layout::for_value(&*value)` may be converted into a box using
6666
//! [`Box::<T>::from_raw(value)`]. For other allocators, [`Box::<T>::from_raw_in(value, alloc)`] may
6767
//! be used. Conversely, the memory backing a `value: *mut T` obtained from [`Box::<T>::into_raw`]
68-
//! may be deallocated using the specific allocator with [`Layout::for_value(&*value)`].
68+
//! may be deallocated using the specific allocator with [`NonZeroLayout::for_value(&*value)`].
6969
//!
7070
//!
7171
//! [dereferencing]: core::ops::Deref
@@ -75,8 +75,8 @@
7575
//! [`Box::<T>::from_raw(value, alloc)`]: crate::boxed::Box::from_raw_in
7676
//! [`Box::<T>::into_raw`]: crate::boxed::Box::into_raw
7777
//! [`Global`]: crate::alloc::Global
78-
//! [`Layout`]: crate::alloc::Layout
79-
//! [`Layout::for_value(&*value)`]: crate::alloc::Layout::for_value
78+
//! [`NonZeroLayout`]: crate::alloc::NonZeroLayout
79+
//! [`NonZeroLayout::for_value(&*value)`]: crate::alloc::NonZeroLayout::for_value
8080
8181
use crate::{
8282
alloc::{AbortAlloc, AllocRef, BuildAllocRef, DeallocRef, Global, NonZeroLayout},

src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
//!
3838
//! Issue: [rust-lang/wg-allocators#16](https://github.com/rust-lang/wg-allocators/issues/16)
3939
//!
40+
//! - Support reallocating to a different alignment.
41+
//!
42+
//! Issue: [rust-lang/wg-allocators#5](https://github.com/rust-lang/wg-allocators/issues/5)
43+
//!
4044
//!
4145
//! [`Alloc`]: https://doc.rust-lang.org/1.38.0/alloc/alloc/trait.Alloc.html
4246
//! [`AllocRef`]: crate::alloc::AllocRef

0 commit comments

Comments
 (0)