Skip to content

Commit 63c46b8

Browse files
Rollup merge of rust-lang#139802 - Lee-Janggun:fix-allocate-hyperlink, r=workingjubilee
Fix some grammar errors and hyperlinks in doc for `trait Allocator` I was reading the allocator docs and noticed some weird sentences and missing hyperlink, so I fixed them and made this small PR. * "while until either" could also be changed to "for a while until either", but I just deleted "while". * fixed sentence with incorrect "at" and "has/have". * linked [*currently allocated*] similar to other methods. All other hyperlinks are fine.
2 parents c18481d + 0369ccb commit 63c46b8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

library/core/src/alloc/mod.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl fmt::Display for AllocError {
9090
/// # Safety
9191
///
9292
/// Memory blocks that are [*currently allocated*] by an allocator,
93-
/// must point to valid memory, and retain their validity while until either:
93+
/// must point to valid memory, and retain their validity until either:
9494
/// - the memory block is deallocated, or
9595
/// - the allocator is dropped.
9696
///
@@ -112,7 +112,9 @@ pub unsafe trait Allocator {
112112
///
113113
/// The returned block of memory remains valid as long as it is [*currently allocated*] and the shorter of:
114114
/// - the borrow-checker lifetime of the allocator type itself.
115-
/// - as long as at the allocator and all its clones has not been dropped.
115+
/// - as long as the allocator and all its clones have not been dropped.
116+
///
117+
/// [*currently allocated*]: #currently-allocated-memory
116118
///
117119
/// # Errors
118120
///

0 commit comments

Comments
 (0)