Skip to content

Commit db15fe6

Browse files
committed
Mark Layout::dangling inline
1 parent 717e0c7 commit db15fe6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libcore/alloc/layout.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ impl Layout {
141141
/// sentinel value. Types that lazily allocate must track initialization by
142142
/// some other means.
143143
#[unstable(feature = "alloc_layout_extra", issue = "55724")]
144+
#[inline]
144145
pub const fn dangling(&self) -> NonNull<u8> {
145146
// align is non-zero and a power of two
146147
unsafe { NonNull::new_unchecked(self.align() as *mut u8) }

0 commit comments

Comments
 (0)