We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Layout::dangling
1 parent 717e0c7 commit db15fe6Copy full SHA for db15fe6
src/libcore/alloc/layout.rs
@@ -141,6 +141,7 @@ impl Layout {
141
/// sentinel value. Types that lazily allocate must track initialization by
142
/// some other means.
143
#[unstable(feature = "alloc_layout_extra", issue = "55724")]
144
+ #[inline]
145
pub const fn dangling(&self) -> NonNull<u8> {
146
// align is non-zero and a power of two
147
unsafe { NonNull::new_unchecked(self.align() as *mut u8) }
0 commit comments