about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTim Diekmann <tim.diekmann@3dvision.de>2020-10-23 22:45:15 +0200
committerTim Diekmann <tim.diekmann@3dvision.de>2020-10-23 22:45:15 +0200
commit693a2bf18b7090202784f561de3dfca45c4f79be (patch)
tree7c2bcdf4681c5fc044dc0590459c0feab1682e54
parent955b37b3059a7e06842559af54e1685e33b0cf6c (diff)
downloadrust-693a2bf18b7090202784f561de3dfca45c4f79be.tar.gz
rust-693a2bf18b7090202784f561de3dfca45c4f79be.zip
Rename `Box::alloc` to `Box::alloc_ref`
-rw-r--r--library/alloc/src/boxed.rs4
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
     }