diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-05-01 22:27:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-01 22:27:21 +0200 |
| commit | b867d20279f0da1a2d6de3f6eb509441afc318af (patch) | |
| tree | 742c4128c439bb636dc15d5bafc40ca05bd9f91b | |
| parent | 931735a1b102342978c7c43ec037917a05a66db7 (diff) | |
| parent | 0369ccb5320da3871bc03e6b0df8afbbfac0c9b9 (diff) | |
| download | rust-b867d20279f0da1a2d6de3f6eb509441afc318af.tar.gz rust-b867d20279f0da1a2d6de3f6eb509441afc318af.zip | |
Rollup merge of #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.
| -rw-r--r-- | library/core/src/alloc/mod.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/library/core/src/alloc/mod.rs b/library/core/src/alloc/mod.rs index 9805cee1c33..9d608d5e83c 100644 --- a/library/core/src/alloc/mod.rs +++ b/library/core/src/alloc/mod.rs @@ -90,7 +90,7 @@ impl fmt::Display for AllocError { /// # Safety /// /// Memory blocks that are [*currently allocated*] by an allocator, -/// must point to valid memory, and retain their validity while until either: +/// must point to valid memory, and retain their validity until either: /// - the memory block is deallocated, or /// - the allocator is dropped. /// @@ -112,7 +112,9 @@ pub unsafe trait Allocator { /// /// The returned block of memory remains valid as long as it is [*currently allocated*] and the shorter of: /// - the borrow-checker lifetime of the allocator type itself. - /// - as long as at the allocator and all its clones has not been dropped. + /// - as long as the allocator and all its clones have not been dropped. + /// + /// [*currently allocated*]: #currently-allocated-memory /// /// # Errors /// |
