about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTim Diekmann <tim.diekmann@3dvision.de>2020-03-26 11:32:22 +0100
committerTim Diekmann <tim.diekmann@3dvision.de>2020-03-26 17:14:34 +0100
commitdb15fe6b383741ae1cc13cfb62fc1c18f8ff5241 (patch)
tree48785214738ebd0e3519116ba07ac2861ab4503a
parent717e0c7b9d4b9fd8a1a3c7451255d30c194c7b3e (diff)
downloadrust-db15fe6b383741ae1cc13cfb62fc1c18f8ff5241.tar.gz
rust-db15fe6b383741ae1cc13cfb62fc1c18f8ff5241.zip
Mark `Layout::dangling` inline
-rw-r--r--src/libcore/alloc/layout.rs1
1 files changed, 1 insertions, 0 deletions
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 @@ impl Layout {
     /// 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<u8> {
         // align is non-zero and a power of two
         unsafe { NonNull::new_unchecked(self.align() as *mut u8) }