Applied suggestion

This commit is contained in:
Volker Weißmann 2022-06-15 14:00:59 +02:00 committed by Taiki Endo
parent 07364d325b
commit 6dd9ce4199
1 changed files with 3 additions and 2 deletions

View File

@ -313,8 +313,9 @@ It's easy to get this to show undefined behavior and fail in other spectacular w
Let's see how pinning and the `Pin` type can help us solve this problem.
The `Pin` type wraps pointer types, guaranteeing that the values behind the
pointer won't be moved. For example, `Pin<&mut T>`, `Pin<&T>`,
`Pin<Box<T>>` all guarantee that `T` won't be moved if `T: !Unpin`.
pointer won't be moved if it is not implementing `Unpin`. For example, `Pin<&mut
T>`, `Pin<&T>`, `Pin<Box<T>>` all guarantee that `T` won't be moved if `T:
!Unpin`.
Most types don't have a problem being moved. These types implement a trait
called `Unpin`. Pointers to `Unpin` types can be freely placed into or taken