diff options
| author | Jonas Schievink <jonasschievink@gmail.com> | 2020-03-03 17:04:35 +0100 |
|---|---|---|
| committer | Jonas Schievink <jonasschievink@gmail.com> | 2020-03-17 22:17:31 +0100 |
| commit | e419168bb8256444ab98f220c03545b8824037d4 (patch) | |
| tree | b5cd6a60dc26e8ba1d4dff89e486bfef6c9e315e | |
| parent | 50b9d772dbca3cd54c772b67abe2eff24e6abac0 (diff) | |
| download | rust-e419168bb8256444ab98f220c03545b8824037d4.tar.gz rust-e419168bb8256444ab98f220c03545b8824037d4.zip | |
Clarify comment
| -rw-r--r-- | src/libcore/future/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/future/mod.rs b/src/libcore/future/mod.rs index 517f8c98c47..6ee8479b347 100644 --- a/src/libcore/future/mod.rs +++ b/src/libcore/future/mod.rs @@ -58,7 +58,7 @@ where impl<T: Generator<ResumeTy, Yield = ()>> Future for GenFuture<T> { type Output = T::Return; fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> { - // Safety: Safe because we're !Unpin + !Drop mapping to a ?Unpin value + // Safety: Safe because we're !Unpin + !Drop, and this is just a field projection. let gen = unsafe { Pin::map_unchecked_mut(self, |s| &mut s.0) }; // Resume the generator, turning the `&mut Context` into a `NonNull` raw pointer. The |
