diff options
| author | Taylor Cramer <cramertj@google.com> | 2018-12-17 17:19:32 -0800 |
|---|---|---|
| committer | Taylor Cramer <cramertj@google.com> | 2018-12-21 20:41:24 -0800 |
| commit | 20d694a95f0110fe253bfca7e9929bfdc6440c7e (patch) | |
| tree | 59c2a5427db23ce29134edfcc5228514340e3ac7 /src/libstd | |
| parent | abaa9344d4c10a45d7725534145007a8284dabe8 (diff) | |
| download | rust-20d694a95f0110fe253bfca7e9929bfdc6440c7e.tar.gz rust-20d694a95f0110fe253bfca7e9929bfdc6440c7e.zip | |
Update Pin API to match the one proposed for stabilization
Remove pin::Unpin reexport and add Unpin to the prelude. Change Pin associated functions to methods. Rename get_mut_unchecked_ to get_unchecked_mut Remove impl Unpin for Pin Mark Pin repr(transparent)
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/future.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/future.rs b/src/libstd/future.rs index d5e6cab948b..3379be79186 100644 --- a/src/libstd/future.rs +++ b/src/libstd/future.rs @@ -43,7 +43,7 @@ impl<T: Generator<Yield = ()>> !Unpin for GenFuture<T> {} impl<T: Generator<Yield = ()>> Future for GenFuture<T> { type Output = T::Return; fn poll(self: Pin<&mut Self>, lw: &LocalWaker) -> Poll<Self::Output> { - set_task_waker(lw, || match unsafe { Pin::get_mut_unchecked(self).0.resume() } { + set_task_waker(lw, || match unsafe { Pin::get_unchecked_mut(self).0.resume() } { GeneratorState::Yielded(()) => Poll::Pending, GeneratorState::Complete(x) => Poll::Ready(x), }) |
