Skip to content

Commit 02d50de

Browse files
committed
Add a tracking issue for extra Layout methods
1 parent de027b6 commit 02d50de

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

src/liballoc/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
#![feature(const_vec_new)]
120120
#![feature(slice_partition_dedup)]
121121
#![feature(maybe_uninit)]
122+
#![feature(alloc_layout_extra)]
122123

123124
// Allow testing this library
124125

src/libcore/alloc.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ impl Layout {
167167
/// Returns an error if the combination of `self.size()` and the given
168168
/// `align` violates the conditions listed in
169169
/// [`Layout::from_size_align`](#method.from_size_align).
170-
#[unstable(feature = "allocator_api", issue = "32838")]
170+
#[unstable(feature = "alloc_layout_extra", issue = "55724")]
171171
#[inline]
172172
pub fn align_to(&self, align: usize) -> Result<Self, LayoutErr> {
173173
Layout::from_size_align(self.size(), cmp::max(self.align(), align))
@@ -189,7 +189,7 @@ impl Layout {
189189
/// to be less than or equal to the alignment of the starting
190190
/// address for the whole allocated block of memory. One way to
191191
/// satisfy this constraint is to ensure `align <= self.align()`.
192-
#[unstable(feature = "allocator_api", issue = "32838")]
192+
#[unstable(feature = "alloc_layout_extra", issue = "55724")]
193193
#[inline]
194194
pub fn padding_needed_for(&self, align: usize) -> usize {
195195
let len = self.size();
@@ -226,7 +226,7 @@ impl Layout {
226226
/// of each element in the array.
227227
///
228228
/// On arithmetic overflow, returns `LayoutErr`.
229-
#[unstable(feature = "allocator_api", issue = "32838")]
229+
#[unstable(feature = "alloc_layout_extra", issue = "55724")]
230230
#[inline]
231231
pub fn repeat(&self, n: usize) -> Result<(Self, usize), LayoutErr> {
232232
let padded_size = self.size().checked_add(self.padding_needed_for(self.align()))
@@ -255,7 +255,7 @@ impl Layout {
255255
/// (assuming that the record itself starts at offset 0).
256256
///
257257
/// On arithmetic overflow, returns `LayoutErr`.
258-
#[unstable(feature = "allocator_api", issue = "32838")]
258+
#[unstable(feature = "alloc_layout_extra", issue = "55724")]
259259
#[inline]
260260
pub fn extend(&self, next: Self) -> Result<(Self, usize), LayoutErr> {
261261
let new_align = cmp::max(self.align(), next.align());
@@ -282,7 +282,7 @@ impl Layout {
282282
/// aligned.
283283
///
284284
/// On arithmetic overflow, returns `LayoutErr`.
285-
#[unstable(feature = "allocator_api", issue = "32838")]
285+
#[unstable(feature = "alloc_layout_extra", issue = "55724")]
286286
#[inline]
287287
pub fn repeat_packed(&self, n: usize) -> Result<Self, LayoutErr> {
288288
let size = self.size().checked_mul(n).ok_or(LayoutErr { private: () })?;
@@ -295,7 +295,7 @@ impl Layout {
295295
/// and is not incorporated *at all* into the resulting layout.
296296
///
297297
/// On arithmetic overflow, returns `LayoutErr`.
298-
#[unstable(feature = "allocator_api", issue = "32838")]
298+
#[unstable(feature = "alloc_layout_extra", issue = "55724")]
299299
#[inline]
300300
pub fn extend_packed(&self, next: Self) -> Result<Self, LayoutErr> {
301301
let new_size = self.size().checked_add(next.size())
@@ -307,7 +307,7 @@ impl Layout {
307307
/// Creates a layout describing the record for a `[T; n]`.
308308
///
309309
/// On arithmetic overflow, returns `LayoutErr`.
310-
#[unstable(feature = "allocator_api", issue = "32838")]
310+
#[unstable(feature = "alloc_layout_extra", issue = "55724")]
311311
#[inline]
312312
pub fn array<T>(n: usize) -> Result<Self, LayoutErr> {
313313
Layout::new::<T>()

src/libstd/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@
310310
#![feature(doc_keyword)]
311311
#![feature(panic_info_message)]
312312
#![feature(non_exhaustive)]
313+
#![feature(alloc_layout_extra)]
313314

314315
#![default_lib_allocator]
315316

0 commit comments

Comments
 (0)