Merge pull request #47 from tmandry/patch-3

Clarify sentence about u8: Unpin
This commit is contained in:
Niko Matsakis 2019-10-22 14:03:20 -04:00 committed by GitHub
commit f65e1f7dd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -104,8 +104,8 @@ pointer won't be moved. For example, `Pin<&mut T>`, `Pin<&T>`,
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
out of `Pin`. For example, `u8` is `Unpin`, so `Pin<&mut T>` behaves just like
a normal `&mut T`.
out of `Pin`. For example, `u8` is `Unpin`, so `Pin<&mut u8>` behaves just like
a normal `&mut u8`.
Some functions require the futures they work with to be `Unpin`. To use a
`Future` or `Stream` that isn't `Unpin` with a function that requires