Skip to content

Commit 693a2bf

Browse files
committed
Rename Box::alloc to Box::alloc_ref
1 parent 955b37b commit 693a2bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/alloc/src/boxed.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -738,11 +738,11 @@ impl<T: ?Sized, A: AllocRef> Box<T, A> {
738738
/// Returns a reference to the underlying allocator.
739739
///
740740
/// Note: this is an associated function, which means that you have
741-
/// to call it as `Box::alloc(&b)` instead of `b.alloc()`. This
741+
/// to call it as `Box::alloc_ref(&b)` instead of `b.alloc_ref()`. This
742742
/// is so that there is no conflict with a method on the inner type.
743743
#[unstable(feature = "allocator_api", issue = "32838")]
744744
#[inline]
745-
pub fn alloc(b: &Self) -> &A {
745+
pub fn alloc_ref(b: &Self) -> &A {
746746
&b.1
747747
}
748748

0 commit comments

Comments
 (0)