diff options
| author | bors <bors@rust-lang.org> | 2020-04-30 19:01:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-04-30 19:01:01 +0000 |
| commit | 7ced01a730e8fc1bae2f8d4369c26812c0484da4 (patch) | |
| tree | 5f972cddf361a86e359b3a523c5ac68110a151db /src/liballoc | |
| parent | be8589fc31162bb71b0f765beba6ce73ec8ba93a (diff) | |
| parent | 97a8870022ec819c8b92b4c192242726c77e19f3 (diff) | |
| download | rust-7ced01a730e8fc1bae2f8d4369c26812c0484da4.tar.gz rust-7ced01a730e8fc1bae2f8d4369c26812c0484da4.zip | |
Auto merge of #71717 - Dylan-DPC:rollup-av5vjor, r=Dylan-DPC
Rollup of 5 pull requests
Successful merges:
- #70950 (extend NLL checker to understand `'empty` combined with universes)
- #71433 (Add help message for missing right operand in condition)
- #71449 (Move `{Free,}RegionRelations` and `FreeRegionMap` to `rustc_infer`)
- #71559 (Detect git version before attempting to use --progress)
- #71597 (Rename Unique::empty() -> Unique::dangling())
Failed merges:
r? @ghost
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/raw_vec.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/liballoc/raw_vec.rs b/src/liballoc/raw_vec.rs index ca165b61e26..a8e19c9cbaa 100644 --- a/src/liballoc/raw_vec.rs +++ b/src/liballoc/raw_vec.rs @@ -25,9 +25,9 @@ mod tests; /// involved. This type is excellent for building your own data structures like Vec and VecDeque. /// In particular: /// -/// * Produces `Unique::empty()` on zero-sized types. -/// * Produces `Unique::empty()` on zero-length allocations. -/// * Avoids freeing `Unique::empty()`. +/// * Produces `Unique::dangling()` on zero-sized types. +/// * Produces `Unique::dangling()` on zero-length allocations. +/// * Avoids freeing `Unique::dangling()`. /// * Catches all overflows in capacity computations (promotes them to "capacity overflow" panics). /// * Guards against 32-bit systems allocating more than isize::MAX bytes. /// * Guards against overflowing your length. @@ -125,7 +125,7 @@ impl<T, A: AllocRef> RawVec<T, A> { /// the returned `RawVec`. pub const fn new_in(alloc: A) -> Self { // `cap: 0` means "unallocated". zero-sized types are ignored. - Self { ptr: Unique::empty(), cap: 0, alloc } + Self { ptr: Unique::dangling(), cap: 0, alloc } } /// Like `with_capacity`, but parameterized over the choice of @@ -172,7 +172,7 @@ impl<T, A: AllocRef> RawVec<T, A> { } /// Gets a raw pointer to the start of the allocation. Note that this is - /// `Unique::empty()` if `capacity == 0` or `T` is zero-sized. In the former case, you must + /// `Unique::dangling()` if `capacity == 0` or `T` is zero-sized. In the former case, you must /// be careful. pub fn ptr(&self) -> *mut T { self.ptr.as_ptr() |
