]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #55366 - Amanieu:stable_layout, r=Amanieu
authorbors <bors@rust-lang.org>
Thu, 8 Nov 2018 06:52:27 +0000 (06:52 +0000)
committerbors <bors@rust-lang.org>
Thu, 8 Nov 2018 06:52:27 +0000 (06:52 +0000)
Add tracking issue for Layout methods (and some API changes)

These methods are already useful when used with the stable global allocator API (stabilized in #51241).

```rust
pub fn align_to(&self, align: usize) -> Result<Layout, LayoutErr>;
pub fn padding_needed_for(&self, align: usize) -> usize;
pub fn repeat(&self, n: usize) -> Result<(Layout, usize), LayoutErr>;
pub fn extend(&self, next: Layout) -> Result<(Layout, usize), LayoutErr>;
pub fn repeat_packed(&self, n: usize) -> Result<Layout, LayoutErr>;
pub fn extend_packed(&self, next: Layout) -> Result<Layout, LayoutErr>;
pub fn array<T>(n: usize) -> Result<Layout, LayoutErr>;
```

cc #32838

r? @SimonSapin

1  2 
src/liballoc/lib.rs
src/libstd/lib.rs

Simple merge
Simple merge