Skip to content

Commit 27d784c

Browse files
committed
refactor-unique: Rename Unique::empty() to Unique::dangling()
1 parent 7f3b3df commit 27d784c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/libcore/ptr/unique.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,8 @@ impl<T: Sized> Unique<T> {
7171
/// a `T`, which means this must not be used as a "not yet initialized"
7272
/// sentinel value. Types that lazily allocate must track initialization by
7373
/// some other means.
74-
// FIXME: rename to dangling() to match NonNull?
7574
#[inline]
76-
pub const fn empty() -> Self {
75+
pub const fn dangling() -> Self {
7776
unsafe { Unique::new_unchecked(mem::align_of::<T>() as *mut T) }
7877
}
7978
}

0 commit comments

Comments
 (0)