@@ -99,7 +99,7 @@ we summarize the high-level points of the `Allocator` API.
99
99
individual sections of code.)
100
100
101
101
* Basic implementation of the trait requires just two methods
102
- (` alloc ` and ` dealloc ` ). You can get an initial implemention off
102
+ (` alloc ` and ` dealloc ` ). You can get an initial implementation off
103
103
the ground with relatively little effort.
104
104
105
105
* All methods that can fail to satisfy a request return a ` Result `
@@ -126,7 +126,7 @@ individual sections of code.)
126
126
127
127
* Heterogenous structure; e.g. ` layout1.extend(layout2) ` ,
128
128
129
- * Homogenous array types: ` layout.repeat(n) ` (for ` n: usize ` ),
129
+ * Homogeneous array types: ` layout.repeat(n) ` (for ` n: usize ` ),
130
130
131
131
* There are packed and unpacked variants for the latter two methods.
132
132
@@ -270,7 +270,7 @@ Since clients are not allowed to have blocks that outlive their
270
270
associated allocator (see the [ lifetimes] [ ] section),
271
271
it is sound for us to always drop the backing storage for an allocator
272
272
when the allocator itself is dropped
273
- (regardless of what sequence of ` alloc ` /` dealloc ` interactions occured
273
+ (regardless of what sequence of ` alloc ` /` dealloc ` interactions occurred
274
274
with the allocator's clients).
275
275
276
276
``` rust
@@ -470,7 +470,7 @@ almost certainly require a *default type*: `Vec<T:
470
470
A: Allocator =HeapAllocator>` and
471
471
` HashMap<K,V,A:Allocator=HeapAllocator> ` .
472
472
473
- Default type parameters themselves, in the context of type defintions ,
473
+ Default type parameters themselves, in the context of type definitions ,
474
474
are a stable part of the Rust language.
475
475
476
476
However, the exact semantics of how default type parameters interact
@@ -640,7 +640,7 @@ in a formal manner, in the style of [IETF RFC 2119][].)
640
640
641
641
5 . (for allocator impls and clients ) if an allocator is cloneable , the
642
642
client * can assume * that all clones
643
- are interchangably compatible in terms of their memory blocks : if
643
+ are interchangeably compatible in terms of their memory blocks : if
644
644
allocator `a2 ` is a clone of `a1 `, then one can allocate a block
645
645
from `a1 ` and return it to `a2 `, or vice versa , or use `a2. realloc`
646
646
on the block, et cetera.
@@ -884,7 +884,7 @@ The Rust project has control over the `libstd` provided allocators, so
884
884
the team can adapt them as necessary to fit the needs of whatever GC
885
885
designs come around. But the same is not true for user- defined
886
886
allocators: we want to ensure that adding support for them does not
887
- inadvertantly kill any chance for adding GC later.
887
+ inadvertently kill any chance for adding GC later.
888
888
889
889
### The inspiration for Layout
890
890
@@ -1009,7 +1009,7 @@ few motivating examples that *are* clearly feasible and useful.
1009
1009
offset) versus ` Layout::array ` (where the offset is derivable from
1010
1010
the input ` T ` ).
1011
1011
1012
- * Such a constraint would have precendent ; in particular, the
1012
+ * Such a constraint would have precedent ; in particular, the
1013
1013
` aligned_alloc ` function of C11 requires the given size
1014
1014
be a multiple of the alignment.
1015
1015
@@ -1072,7 +1072,7 @@ few motivating examples that *are* clearly feasible and useful.
1072
1072
that reborrowing machinery is available to the client code.)
1073
1073
1074
1074
Put more simply, requiring that allocators implement ` Clone ` means
1075
- that it will * not* be pratical to do
1075
+ that it will * not* be practical to do
1076
1076
` impl<'a> Allocator for &'a mut MyUniqueAlloc ` .
1077
1077
1078
1078
By using ` &mut self ` for the allocation methods, we can encode
@@ -1204,7 +1204,7 @@ few motivating examples that *are* clearly feasible and useful.
1204
1204
1205
1205
# Change History
1206
1206
1207
- * Changed ` fn usable_size ` to return ` (l, m) ` rathern than just ` m ` .
1207
+ * Changed ` fn usable_size ` to return ` (l, m) ` rather than just ` m ` .
1208
1208
1209
1209
* Removed ` fn is_transient ` from ` trait AllocError ` , and removed discussion
1210
1210
of transient errors from the API.
@@ -1583,7 +1583,7 @@ impl Layout {
1583
1583
/// Creates a layout describing the record for `self` followed by
1584
1584
/// `next` with no additional padding between the two. Since no
1585
1585
/// padding is inserted, the alignment of `next` is irrelevant,
1586
- /// and is not incoporated *at all* into the resulting layout.
1586
+ /// and is not incorporated *at all* into the resulting layout.
1587
1587
///
1588
1588
/// Returns `(k, offset)`, where `k` is layout of the concatenated
1589
1589
/// record and `offset` is the relative location, in bytes, of the
@@ -1654,7 +1654,7 @@ impl Layout {
1654
1654
/// Creates a layout describing the record for `self` followed by
1655
1655
/// `next` with no additional padding between the two. Since no
1656
1656
/// padding is inserted, the alignment of `next` is irrelevant,
1657
- /// and is not incoporated *at all* into the resulting layout.
1657
+ /// and is not incorporated *at all* into the resulting layout.
1658
1658
///
1659
1659
/// Returns `(k, offset)`, where `k` is layout of the concatenated
1660
1660
/// record and `offset` is the relative location, in bytes, of the
@@ -1715,7 +1715,7 @@ pub enum AllocErr {
1715
1715
/// satisfying the original request. This condition implies that
1716
1716
/// such an allocation request will never succeed on the given
1717
1717
/// allocator, regardless of environment, memory pressure, or
1718
- /// other contextual condtions .
1718
+ /// other contextual conditions .
1719
1719
///
1720
1720
/// For example, an allocator that does not support zero-sized
1721
1721
/// blocks can return this error variant.
@@ -1810,7 +1810,7 @@ pub unsafe trait Allocator {
1810
1810
/// practice this means implementors should eschew allocating,
1811
1811
/// especially from `self` (directly or indirectly).
1812
1812
///
1813
- /// Implementions of this trait's allocation methods are discouraged
1813
+ /// Implementations of this trait's allocation methods are discouraged
1814
1814
/// from panicking (or aborting) in the event of memory exhaustion;
1815
1815
/// instead they should return an appropriate error from the
1816
1816
/// invoked method, and let the client decide whether to invoke
0 commit comments