From 693a2bf18b7090202784f561de3dfca45c4f79be Mon Sep 17 00:00:00 2001 From: Tim Diekmann Date: Fri, 23 Oct 2020 22:45:15 +0200 Subject: Rename `Box::alloc` to `Box::alloc_ref` --- library/alloc/src/boxed.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'library/alloc/src') 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 Box { /// 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 } -- cgit 1.4.1-3-g733a5