Skip to content

Commit 8bffc2f

Browse files
authored
Merge pull request #2392 from shepmaster/spelling
Correct typos
2 parents 1c851e0 + 24028a8 commit 8bffc2f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

text/2349-pin.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Let's take that goal apart, piece by piece, from the perspective of the futures
3636

3737
At the same time, we want to support futures (and iterators, etc.) that *can* move. While it's possible to do so by providing two distinct `Future` (or `Iterator`, etc) traits, such designs incur unacceptable ergonomic costs.
3838

39-
The key insight of this RFC is that we can create a new library type, `Pin<'a, T>`, which encompasses *both* moveable and immobile referents. The type is paired with a new auto trait, `Unpin`, which determines the meaning of `Pin<'a, T>`:
39+
The key insight of this RFC is that we can create a new library type, `Pin<'a, T>`, which encompasses *both* movable and immobile referents. The type is paired with a new auto trait, `Unpin`, which determines the meaning of `Pin<'a, T>`:
4040

4141
- If `T: Unpin` (which is the default), then `Pin<'a, T>` is entirely equivalent to `&'a mut T`.
4242
- If `T: !Unpin`, then `Pin<'a, T>` provides a unique reference to a `T` with lifetime `'a`, but only provides `&'a T` access safely. It also guarantees that the referent will *never* be moved. However, getting `&'a mut T` access is unsafe, because operations like `mem::replace` mean that `&mut` access is enough to move data out of the referent; you must promise not to do so.
@@ -56,7 +56,7 @@ trait Future {
5656

5757
By default when implementing `Future` for a struct, this definition is equivalent to today's, which takes `&mut self`. But if you want to allow self-referencing in your future, you just opt out of `Unpin`, and `Pin` takes care of the rest.
5858

59-
This RFC also provides a pinned analogiy to `Box` called `PinBox<T>`. It work alongs the same lines as the `Pin` type discussed here - if the type implements `Unpin`, it functions the same as the unpinned `Box`; if the type has opted out of `Unpin`, it guarantees that they type behind the reference will not be moved again.
59+
This RFC also provides a pinned analogy to `Box` called `PinBox<T>`. It works along the same lines as the `Pin` type discussed here - if the type implements `Unpin`, it functions the same as the unpinned `Box`; if the type has opted out of `Unpin`, it guarantees that they type behind the reference will not be moved again.
6060

6161
# Reference-level explanation
6262

@@ -313,7 +313,7 @@ trait Generator {
313313

314314
This would require no extensions to the standard library, but would place the
315315
burden on every user who wants to call resume to guarantee (at the risk of
316-
memory insafety) that their types were not moved, or that they were moveable.
316+
memory unsafety) that their types were not moved, or that they were movable.
317317
This seemed like a worse trade off than adding these APIs.
318318

319319
## Anchor as a wrapper type and `StableDeref`
@@ -326,7 +326,7 @@ been replaced with `PinBox`.
326326
The primary benefit of this approach was that it was partially integrated with
327327
crates like owning-ref and rental, which also use a hierarchy of stability
328328
traits. However, because of differences in the requirements, the traits used by
329-
owning-ref et al ended up being a non-overlapping subset of the traits proposed
329+
owning-ref et al. ended up being a non-overlapping subset of the traits proposed
330330
by this RFC from the traits used by the Anchor type. Merging these into a
331331
single hierarchy provided relatively little benefit.
332332

0 commit comments

Comments
 (0)