File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 120
120
#![ feature( inplace_iteration) ]
121
121
#![ feature( iter_advance_by) ]
122
122
#![ feature( layout_for_ptr) ]
123
+ #![ feature( layout_padding_needed_for) ]
123
124
#![ feature( maybe_uninit_slice) ]
124
125
#![ cfg_attr( test, feature( new_uninit) ) ]
125
126
#![ feature( nonnull_slice_from_raw_parts) ]
Original file line number Diff line number Diff line change @@ -225,11 +225,14 @@ impl Layout {
225
225
/// padding required to get a 4-aligned address (assuming that the
226
226
/// corresponding memory block starts at a 4-aligned address).
227
227
///
228
+ /// The return value of this function has no meaning if `align` is
229
+ /// not a power-of-two.
230
+ ///
228
231
/// Note that the utility of the returned value requires `align`
229
232
/// to be less than or equal to the alignment of the starting
230
233
/// address for the whole allocated block of memory. One way to
231
234
/// 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 " ) ]
233
236
#[ rustc_const_unstable( feature = "const_alloc_layout" , issue = "67521" ) ]
234
237
#[ must_use = "this returns the padding needed, \
235
238
without modifying the `Layout`"]
You can’t perform that action at this time.
0 commit comments