diff options
| author | Tim Diekmann <tim.diekmann@3dvision.de> | 2020-10-23 22:45:15 +0200 |
|---|---|---|
| committer | Tim Diekmann <tim.diekmann@3dvision.de> | 2020-10-23 22:45:15 +0200 |
| commit | 693a2bf18b7090202784f561de3dfca45c4f79be (patch) | |
| tree | 7c2bcdf4681c5fc044dc0590459c0feab1682e54 | |
| parent | 955b37b3059a7e06842559af54e1685e33b0cf6c (diff) | |
| download | rust-693a2bf18b7090202784f561de3dfca45c4f79be.tar.gz rust-693a2bf18b7090202784f561de3dfca45c4f79be.zip | |
Rename `Box::alloc` to `Box::alloc_ref`
| -rw-r--r-- | library/alloc/src/boxed.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs index b4455233301..997dd975c83 100644 --- a/library/alloc/src/boxed.rs +++ b/library/alloc/src/boxed.rs @@ -738,11 +738,11 @@ impl<T: ?Sized, A: AllocRef> Box<T, A> { /// Returns a reference to the underlying allocator. /// /// Note: this is an associated function, which means that you have - /// to call it as `Box::alloc(&b)` instead of `b.alloc()`. This + /// to call it as `Box::alloc_ref(&b)` instead of `b.alloc_ref()`. This /// is so that there is no conflict with a method on the inner type. #[unstable(feature = "allocator_api", issue = "32838")] #[inline] - pub fn alloc(b: &Self) -> &A { + pub fn alloc_ref(b: &Self) -> &A { &b.1 } |
