From 76d3003d4c4ad12f96e2655042f409de5f198c24 Mon Sep 17 00:00:00 2001 From: Matthew Kraai Date: Fri, 6 Dec 2019 09:08:25 -0800 Subject: [PATCH 1/5] Change "result" to "resulting" in `Layout::extend`'s docs --- src/libcore/alloc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs index 20248f7f6c13e..7d69d2846038b 100644 --- a/src/libcore/alloc.rs +++ b/src/libcore/alloc.rs @@ -253,7 +253,7 @@ impl Layout { /// Creates a layout describing the record for `self` followed by /// `next`, including any necessary padding to ensure that `next` - /// will be properly aligned. Note that the result layout will + /// will be properly aligned. Note that the resulting layout will /// satisfy the alignment properties of both `self` and `next`. /// /// The resulting layout will be the same as that of a C struct containing From 852be72c433a02f0c3cb28f6703c2b08f2067831 Mon Sep 17 00:00:00 2001 From: Matthew Kraai Date: Fri, 6 Dec 2019 09:55:28 -0800 Subject: [PATCH 2/5] Change "though" to "through" in `Alloc`'s docs --- src/libcore/alloc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs index 7d69d2846038b..f88415e16e33c 100644 --- a/src/libcore/alloc.rs +++ b/src/libcore/alloc.rs @@ -388,7 +388,7 @@ impl fmt::Display for CannotReallocInPlace { } /// A memory allocator that can be registered as the standard library’s default -/// though the `#[global_allocator]` attributes. +/// through the `#[global_allocator]` attributes. /// /// Some of the methods require that a memory block be *currently /// allocated* via an allocator. This means that: From b2392fddab7b153b6c7083371a80f36bb3005cd7 Mon Sep 17 00:00:00 2001 From: Matthew Kraai Date: Fri, 6 Dec 2019 10:05:41 -0800 Subject: [PATCH 3/5] Add "this" to `GlobalAlloc::alloc`'s docs --- src/libcore/alloc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs index f88415e16e33c..9ec7e1d913645 100644 --- a/src/libcore/alloc.rs +++ b/src/libcore/alloc.rs @@ -459,7 +459,7 @@ pub unsafe trait GlobalAlloc { /// # Errors /// /// Returning a null pointer indicates that either memory is exhausted - /// or `layout` does not meet allocator's size or alignment constraints. + /// or `layout` does not meet this allocator's size or alignment constraints. /// /// Implementations are encouraged to return null on memory /// exhaustion rather than aborting, but this is not From cca954eb22101ee924b4ffb34bd9ffcec0d9d9be Mon Sep 17 00:00:00 2001 From: Matthew Kraai Date: Sat, 7 Dec 2019 22:59:14 -0500 Subject: [PATCH 4/5] Change "`alloc`/`realloc`" to "`realloc/dealloc`" --- src/libcore/alloc.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs index 9ec7e1d913645..c8a3a2d9fe5a1 100644 --- a/src/libcore/alloc.rs +++ b/src/libcore/alloc.rs @@ -1046,7 +1046,7 @@ pub unsafe trait Alloc { /// Captures a common usage pattern for allocators. /// /// The returned block is suitable for passing to the - /// `alloc`/`realloc` methods of this allocator. + /// `realloc`/`dealloc` methods of this allocator. /// /// Note to implementors: If this returns `Ok(ptr)`, then `ptr` /// must be considered "currently allocated" and must be @@ -1112,7 +1112,7 @@ pub unsafe trait Alloc { /// Captures a common usage pattern for allocators. /// /// The returned block is suitable for passing to the - /// `alloc`/`realloc` methods of this allocator. + /// `realloc`/`dealloc` methods of this allocator. /// /// Note to implementors: If this returns `Ok(ptr)`, then `ptr` /// must be considered "currently allocated" and must be @@ -1159,7 +1159,7 @@ pub unsafe trait Alloc { /// Captures a common usage pattern for allocators. /// /// The returned block is suitable for passing to the - /// `alloc`/`realloc` methods of this allocator. + /// `realloc`/`dealloc` methods of this allocator. /// /// # Safety /// From 9e8505d79e6f44803b7b75b8405b193e1f63dab6 Mon Sep 17 00:00:00 2001 From: Matthew Kraai Date: Sat, 7 Dec 2019 23:00:33 -0500 Subject: [PATCH 5/5] Change "attributes" to "attribute" in `Alloc`'s docs --- src/libcore/alloc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs index c8a3a2d9fe5a1..a6dc19220c950 100644 --- a/src/libcore/alloc.rs +++ b/src/libcore/alloc.rs @@ -388,7 +388,7 @@ impl fmt::Display for CannotReallocInPlace { } /// A memory allocator that can be registered as the standard library’s default -/// through the `#[global_allocator]` attributes. +/// through the `#[global_allocator]` attribute. /// /// Some of the methods require that a memory block be *currently /// allocated* via an allocator. This means that: