From db15fe6b383741ae1cc13cfb62fc1c18f8ff5241 Mon Sep 17 00:00:00 2001 From: Tim Diekmann Date: Thu, 26 Mar 2020 11:32:22 +0100 Subject: [PATCH] Mark `Layout::dangling` inline --- src/libcore/alloc/layout.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcore/alloc/layout.rs b/src/libcore/alloc/layout.rs index c798aacc90b..fa644cfe99e 100644 --- a/src/libcore/alloc/layout.rs +++ b/src/libcore/alloc/layout.rs @@ -141,6 +141,7 @@ pub fn for_value(t: &T) -> Self { /// sentinel value. Types that lazily allocate must track initialization by /// some other means. #[unstable(feature = "alloc_layout_extra", issue = "55724")] + #[inline] pub const fn dangling(&self) -> NonNull { // align is non-zero and a power of two unsafe { NonNull::new_unchecked(self.align() as *mut u8) } -- 2.44.0