Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
fu5ha authored and Manishearth committed Jan 7, 2024
1 parent 252a83b commit f2447a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/core/src/pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
//! [`Pin<Ptr>`] to it *does not* actually change the way the compiler behaves towards the
//! inner value! It is possible to use incorrect [`unsafe`] code to create a [`Pin<Ptr>`] to a
//! value which does not actually satisfy the invariants that a pinned value must satisfy, and in
//! this way lead undefined behavior even in (from that point) fully safe code. Similarly, using
//! this way lead to undefined behavior even in (from that point) fully safe code. Similarly, using
//! [`unsafe`], one may get access to a bare [`&mut T`] from a [`Pin<Ptr>`] and
//! use that to invalidly *move* pinned the value out. It is the job of the user of the
//! [`unsafe`] parts of the [`Pin`] API to ensure these invariants are not violated.
Expand Down Expand Up @@ -423,9 +423,9 @@
//! /// Create a new `Unmovable`.
//! ///
//! /// To ensure the data doesn't move we place it on the heap behind a pinning Box.
//! /// Note that the data is pinned, but the which is pinning it can itself still be moved.
//! /// This is important because it means we can return the pointer from the function, which
//! /// is itself a kind of move!
//! /// Note that the data is pinned, but the `Pin<Box<Self>>` which is pinning it can
//! /// itself still be moved. This is important because it means we can return the pinning
//! /// pointer from the function, which is itself a kind of move!
//! fn new() -> Pin<Box<Self>> {
//! let res = Unmovable {
//! data: [0; 64],
Expand Down

0 comments on commit f2447a6

Please sign in to comment.