144144//!     * e.g. [`drop`]ping the [`Future`] [^pin-drop-future] 
145145//! 
146146//! There are two possible ways to ensure the invariants required for 2. and 3. above (which 
147- //! apply to any address-sensitive type, not just self-referrential  types) do not get broken. 
147+ //! apply to any address-sensitive type, not just self-referential  types) do not get broken. 
148148//! 
149149//! 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 
170170//! become viral throughout all code that interacts with the object. 
171171//! 
172172//! The second option is a viable solution to the problem for some use cases, in particular 
173- //! for self-referrential  types. Under this model, any type that has an address sensitive state 
173+ //! for self-referential  types. Under this model, any type that has an address sensitive state 
174174//! would ultimately store its data in something like a [`Box<T>`], carefully manage internal 
175175//! access to that data to ensure no *moves* or other invalidation occurs, and finally 
176176//! provide a safe interface on top. 
186186//! 
187187//! Although there were other reason as well, this issue of expensive composition is the key thing 
188188//! that drove Rust towards adopting a different model. It is particularly a problem 
189- //! when one considers, for exapmle , the implications of composing together the [`Future`]s which 
190- //! will eventaully  make up an asynchronous task (including address-sensitive `async fn` state 
189+ //! when one considers, for example , the implications of composing together the [`Future`]s which 
190+ //! will eventually  make up an asynchronous task (including address-sensitive `async fn` state 
191191//! machines). It is plausible that there could be many layers of [`Future`]s composed together, 
192192//! including multiple layers of `async fn`s handling different parts of a task. It was deemed 
193193//! unacceptable to force indirection and allocation for each layer of composition in this case. 
359359//! Builtin types that are [`Unpin`] include all of the primitive types, like [`bool`], [`i32`], 
360360//! and [`f32`], references (<code>[&]T</code> and <code>[&mut] T</code>), etc., as well as many 
361361//! core and standard library types like [`Box<T>`], [`String`], and more. 
362- //! These types are marked [`Unpin`] because they do not have an ddress -sensitive state like the 
362+ //! These types are marked [`Unpin`] because they do not have an address -sensitive state like the 
363363//! ones we discussed above. If they did have such a state, those parts of their interface would be 
364364//! unsound without being expressed through pinning, and they would then need to not 
365365//! implement [`Unpin`]. 
@@ -953,7 +953,7 @@ use crate::{
953953/// discussed below. 
954954/// 
955955/// We call such a [`Pin`]-wrapped pointer a **pinning pointer** (or pinning ref, or pinning 
956- /// [`Box`], etc.) because its existince  is the thing that is pinning the underlying pointee in 
956+ /// [`Box`], etc.) because its existence  is the thing that is pinning the underlying pointee in 
957957/// place: it is the metaphorical "pin" securing the data in place on the pinboard (in memory). 
958958/// 
959959/// It is important to stress that the thing in the [`Pin`] is not the value which we want to pin 
@@ -962,7 +962,7 @@ use crate::{
962962/// 
963963/// The most common set of types which require pinning related guarantees for soundness are the 
964964/// compiler-generated state machines that implement [`Future`] for the return value of 
965- /// `async fn`s. These compiler-generated [`Future`]s may contain self-referrential  pointers, one 
965+ /// `async fn`s. These compiler-generated [`Future`]s may contain self-referential  pointers, one 
966966/// of the most common use cases for [`Pin`]. More details on this point are provided in the 
967967/// [`pin` module] docs, but suffice it to say they require the guarantees provided by pinning to 
968968/// be implemented soundly. 
0 commit comments