diff options
| author | cohenarthur <arthur.cohen@epita.fr> | 2020-04-30 11:00:45 +0200 |
|---|---|---|
| committer | cohenarthur <arthur.cohen@epita.fr> | 2020-04-30 11:00:45 +0200 |
| commit | eda7f8fdff16aee5ff30b150555c479f885ba993 (patch) | |
| tree | 3ad0d0b09e0aba9b143492dbf327cb77c1da11dd /src/libcore | |
| parent | 7c8dbd969dd0ef2af6d8bab9e03ba7ce6cac41a2 (diff) | |
| download | rust-eda7f8fdff16aee5ff30b150555c479f885ba993.tar.gz rust-eda7f8fdff16aee5ff30b150555c479f885ba993.zip | |
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
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/ptr/unique.rs | 3 |
1 files changed, 1 insertions, 2 deletions
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<T: Sized> Unique<T> { /// 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::<T>() as *mut T) } |
