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.
1 parent 7f3b3df commit 27d784cCopy full SHA for 27d784c
src/libcore/ptr/unique.rs
@@ -71,9 +71,8 @@ impl<T: Sized> Unique<T> {
71
/// a `T`, which means this must not be used as a "not yet initialized"
72
/// sentinel value. Types that lazily allocate must track initialization by
73
/// some other means.
74
- // FIXME: rename to dangling() to match NonNull?
75
#[inline]
76
- pub const fn empty() -> Self {
+ pub const fn dangling() -> Self {
77
unsafe { Unique::new_unchecked(mem::align_of::<T>() as *mut T) }
78
}
79
0 commit comments