Skip to content

Commit f250951

Browse files
RalfJungCentril
andauthored
Apply suggestions from code review
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
1 parent 2eb074d commit f250951

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libcore/pin.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
//! }
183183
//! }
184184
//! ```
185-
//! `inner_drop` has the type that `drop` *should* have, so this makes sure that
185+
//! The function `inner_drop` has the type that `drop` *should* have, so this makes sure that
186186
//! you do not accidentally use `self`/`this` in a way that is in conflict with pinning.
187187
//!
188188
//! Moreover, if your type is `#[repr(packed)]`, the compiler will automatically
@@ -196,7 +196,7 @@
196196
//! The usual approach is to write helper methods (so called *projections*)
197197
//! that turn `Pin<&mut Struct>` into a reference to the field, but what
198198
//! type should that reference have? Is it `Pin<&mut Field>` or `&mut Field`?
199-
//! The same question arises with the fields of an enum, and also when considering
199+
//! The same question arises with the fields of an `enum`, and also when considering
200200
//! container/wrapper types such as [`Vec<T>`], [`Box<T>`], or [`RefCell<T>`].
201201
//! (This question applies to both mutable and shared references, we just
202202
//! use the more common case of mutable references here for illustration.)
@@ -209,7 +209,7 @@
209209
//! pinning removed as part of the projection. If both are done for the same field,
210210
//! that will likely be unsound!
211211
//!
212-
//! Basically, as the author of a data structure you get to decide for each field whether pinning
212+
//! As the author of a data structure you get to decide for each field whether pinning
213213
//! "propagates" to this field or not. Pinning that propagates is also called "structural",
214214
//! because it follows the structure of the type.
215215
//! In the following, we describe the considerations that have to be made for either choice.
@@ -235,7 +235,7 @@
235235
//! ```
236236
//!
237237
//! You may also `impl Unpin for Struct` *even if* the type of `field`
238-
//! is not `Unpin`. What that type thinks about pinning is just not relevant
238+
//! is not `Unpin`. What that type thinks about pinning is not relevant
239239
//! when no `Pin<&mut Field>` is ever created.
240240
//!
241241
//! ## Pinning *is* structural for `field`

0 commit comments

Comments
 (0)