diff options
| author | David Tolnay <dtolnay@gmail.com> | 2022-03-26 19:43:11 -0700 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2022-03-31 12:34:48 -0700 |
| commit | 4246916619e98b5e2c5f5abd21caacfdd392ec71 (patch) | |
| tree | 0405bccbbe1d2e179cc7a905ece59a6ba90dd42e /library/core/src/alloc | |
| parent | 5d30180634080dd761db77afc748dfd58e192a1d (diff) | |
| download | rust-4246916619e98b5e2c5f5abd21caacfdd392ec71.tar.gz rust-4246916619e98b5e2c5f5abd21caacfdd392ec71.zip | |
Adjust feature names that disagree on const stabilization version
Diffstat (limited to 'library/core/src/alloc')
| -rw-r--r-- | library/core/src/alloc/layout.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/core/src/alloc/layout.rs b/library/core/src/alloc/layout.rs index 0639d6eed62..db6898c1308 100644 --- a/library/core/src/alloc/layout.rs +++ b/library/core/src/alloc/layout.rs @@ -56,7 +56,7 @@ impl Layout { /// must not overflow (i.e., the rounded value must be less than /// or equal to `usize::MAX`). #[stable(feature = "alloc_layout", since = "1.28.0")] - #[rustc_const_stable(feature = "const_alloc_layout", since = "1.50.0")] + #[rustc_const_stable(feature = "const_alloc_layout_size_align", since = "1.50.0")] #[inline] pub const fn from_size_align(size: usize, align: usize) -> Result<Self, LayoutError> { if !align.is_power_of_two() { @@ -93,7 +93,7 @@ impl Layout { /// This function is unsafe as it does not verify the preconditions from /// [`Layout::from_size_align`]. #[stable(feature = "alloc_layout", since = "1.28.0")] - #[rustc_const_stable(feature = "alloc_layout", since = "1.36.0")] + #[rustc_const_stable(feature = "const_alloc_layout_unchecked", since = "1.36.0")] #[must_use] #[inline] pub const unsafe fn from_size_align_unchecked(size: usize, align: usize) -> Self { @@ -103,7 +103,7 @@ impl Layout { /// The minimum size in bytes for a memory block of this layout. #[stable(feature = "alloc_layout", since = "1.28.0")] - #[rustc_const_stable(feature = "const_alloc_layout", since = "1.50.0")] + #[rustc_const_stable(feature = "const_alloc_layout_size_align", since = "1.50.0")] #[must_use] #[inline] pub const fn size(&self) -> usize { @@ -112,7 +112,7 @@ impl Layout { /// The minimum byte alignment for a memory block of this layout. #[stable(feature = "alloc_layout", since = "1.28.0")] - #[rustc_const_stable(feature = "const_alloc_layout", since = "1.50.0")] + #[rustc_const_stable(feature = "const_alloc_layout_size_align", since = "1.50.0")] #[must_use = "this returns the minimum alignment, \ without modifying the layout"] #[inline] |
