Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e2aa7c1

Browse files
committedNov 25, 2024
fix Allocator method names in alloc free function docs
1 parent 6ffa455 commit e2aa7c1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎alloc/src/alloc.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub use std::alloc::Global;
6161
/// of the allocator registered with the `#[global_allocator]` attribute
6262
/// if there is one, or the `std` crate’s default.
6363
///
64-
/// This function is expected to be deprecated in favor of the `alloc` method
64+
/// This function is expected to be deprecated in favor of the `allocate` method
6565
/// of the [`Global`] type when it and the [`Allocator`] trait become stable.
6666
///
6767
/// # Safety
@@ -106,7 +106,7 @@ pub unsafe fn alloc(layout: Layout) -> *mut u8 {
106106
/// of the allocator registered with the `#[global_allocator]` attribute
107107
/// if there is one, or the `std` crate’s default.
108108
///
109-
/// This function is expected to be deprecated in favor of the `dealloc` method
109+
/// This function is expected to be deprecated in favor of the `deallocate` method
110110
/// of the [`Global`] type when it and the [`Allocator`] trait become stable.
111111
///
112112
/// # Safety
@@ -125,7 +125,7 @@ pub unsafe fn dealloc(ptr: *mut u8, layout: Layout) {
125125
/// of the allocator registered with the `#[global_allocator]` attribute
126126
/// if there is one, or the `std` crate’s default.
127127
///
128-
/// This function is expected to be deprecated in favor of the `realloc` method
128+
/// This function is expected to be deprecated in favor of the `grow` and `shrink` methods
129129
/// of the [`Global`] type when it and the [`Allocator`] trait become stable.
130130
///
131131
/// # Safety
@@ -145,7 +145,7 @@ pub unsafe fn realloc(ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8
145145
/// of the allocator registered with the `#[global_allocator]` attribute
146146
/// if there is one, or the `std` crate’s default.
147147
///
148-
/// This function is expected to be deprecated in favor of the `alloc_zeroed` method
148+
/// This function is expected to be deprecated in favor of the `allocate_zeroed` method
149149
/// of the [`Global`] type when it and the [`Allocator`] trait become stable.
150150
///
151151
/// # Safety

0 commit comments

Comments
 (0)
Failed to load comments.