File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 120120#![ feature( inplace_iteration) ]
121121#![ feature( iter_advance_by) ]
122122#![ feature( layout_for_ptr) ]
123+ #![ feature( layout_padding_needed_for) ]
123124#![ feature( maybe_uninit_slice) ]
124125#![ cfg_attr( test, feature( new_uninit) ) ]
125126#![ feature( nonnull_slice_from_raw_parts) ]
Original file line number Diff line number Diff line change @@ -225,11 +225,14 @@ impl Layout {
225225 /// padding required to get a 4-aligned address (assuming that the
226226 /// corresponding memory block starts at a 4-aligned address).
227227 ///
228+ /// The return value of this function has no meaning if `align` is
229+ /// not a power-of-two.
230+ ///
228231 /// Note that the utility of the returned value requires `align`
229232 /// to be less than or equal to the alignment of the starting
230233 /// address for the whole allocated block of memory. One way to
231234 /// satisfy this constraint is to ensure `align <= self.align()`.
232- #[ stable ( feature = "alloc_layout_extra " , since = "1.63.0 " ) ]
235+ #[ unstable ( feature = "layout_padding_needed_for " , issue = "55724 " ) ]
233236 #[ rustc_const_unstable( feature = "const_alloc_layout" , issue = "67521" ) ]
234237 #[ must_use = "this returns the padding needed, \
235238 without modifying the `Layout`"]
You can’t perform that action at this time.
0 commit comments