From eda7f8fdff16aee5ff30b150555c479f885ba993 Mon Sep 17 00:00:00 2001 From: cohenarthur Date: Thu, 30 Apr 2020 11:00:45 +0200 Subject: rename-unique: Rename Unique::empty() to Unique::dangling() rename-unique: Change calls and doc in raw_vec.rs rename-unique: Change empty() -> dangling() in const-ptr-unique-rpass.rs --- src/libcore/ptr/unique.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/libcore') diff --git a/src/libcore/ptr/unique.rs b/src/libcore/ptr/unique.rs index f5a5baceacc..f58d35f0613 100644 --- a/src/libcore/ptr/unique.rs +++ b/src/libcore/ptr/unique.rs @@ -70,9 +70,8 @@ impl Unique { /// a `T`, which means this must not be used as a "not yet initialized" /// sentinel value. Types that lazily allocate must track initialization by /// some other means. - // FIXME: rename to dangling() to match NonNull? #[inline] - pub const fn empty() -> Self { + pub const fn dangling() -> Self { // SAFETY: mem::align_of() returns a valid, non-null pointer. The // conditions to call new_unchecked() are thus respected. unsafe { Unique::new_unchecked(mem::align_of::() as *mut T) } -- cgit 1.4.1-3-g733a5