Skip to content

Commit 68bdedd

Browse files
ManishearthRalfJungdanielhenrymantilla
committedJan 7, 2024
Apply suggestions from code review
Co-authored-by: Ralf Jung <post@ralfj.de> Co-authored-by: Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>
1 parent 4c25246 commit 68bdedd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎library/core/src/pin.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@
146146
//! There are two possible ways to ensure the invariants required for 2. and 3. above (which
147147
//! apply to any address-sensitive type, not just self-referrential types) do not get broken.
148148
//!
149-
//! 1. Have the value detect when it is moved and update all the pointers that point to itself
149+
//! 1. Have the value detect when it is moved and update all the pointers that point to itself.
150150
//! 2. Guarantee that the address of the value does not change (and that memory is not re-used
151151
//! for anything else) during the time that the pointers to it are expected to be valid to
152-
//! dereference
152+
//! dereference.
153153
//!
154154
//! Since, as we discussed, Rust can move values without notifying them that they have moved, the
155155
//! first option is ruled out.
@@ -203,7 +203,7 @@
203203
//! will not be *moved* or [otherwise invalidated][subtle-details].
204204
//!
205205
//! We call such a [`Pin`]-wrapped pointer a **pinning pointer,** (or pinning reference, or pinning
206-
//! `Box`, etc.) because its existince is the thing that is *symbolically* pinning the underlying
206+
//! `Box`, etc.) because its existence is the thing that is conceptually pinning the underlying
207207
//! pointee in place: it is the metaphorical "pin" securing the data in place on the pinboard
208208
//! (in memory).
209209
//!
@@ -332,7 +332,7 @@
332332
//!
333333
//! ## [`Unpin`]
334334
//!
335-
//! The vast majority of Rust types have no address-sensitive states; these types
335+
//! The vast majority of Rust types have no address-sensitive states. These types
336336
//! implement the [`Unpin`] auto-trait, which cancels the restrictive effects of
337337
//! [`Pin`] when the *pointee* type `T` is [`Unpin`]. When [`T: Unpin`][Unpin],
338338
//! <code>[Pin]<[Box]\<T>></code> functions identically to a non-pinning [`Box<T>`]; similarly,

0 commit comments

Comments
 (0)