From 5e17e3988165d3245e38af0b1c40cde47699f6a7 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Sun, 8 Dec 2019 01:43:10 +0100 Subject: Require stable/unstable annotations for the constness of all stable functions with a `const` modifier --- src/libcore/alloc.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libcore/alloc.rs') diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs index 5c24e3d8f5d..71517ffb006 100644 --- a/src/libcore/alloc.rs +++ b/src/libcore/alloc.rs @@ -100,6 +100,7 @@ impl Layout { /// This function is unsafe as it does not verify the preconditions from /// [`Layout::from_size_align`](#method.from_size_align). #[stable(feature = "alloc_layout", since = "1.28.0")] + #[cfg_attr(not(bootstrap), rustc_const_stable(feature = "alloc_layout", since = "1.28.0"))] #[inline] pub const unsafe fn from_size_align_unchecked(size: usize, align: usize) -> Self { Layout { size_: size, align_: NonZeroUsize::new_unchecked(align) } -- cgit 1.4.1-3-g733a5