diff options
| author | Without Boats <boats@mozilla.com> | 2018-09-01 06:12:10 +0200 |
|---|---|---|
| committer | Without Boats <boats@mozilla.com> | 2018-09-01 06:57:58 +0200 |
| commit | 974bdc80fe3214159dc30e0bbb76694900e613c0 (patch) | |
| tree | a4ce3c775b9c740ffffb0d7609fe14520fe1ec94 /src/libstd/panic.rs | |
| parent | e6b35b0e1115f008796e8313574e4a4739b6d39d (diff) | |
| download | rust-974bdc80fe3214159dc30e0bbb76694900e613c0.tar.gz rust-974bdc80fe3214159dc30e0bbb76694900e613c0.zip | |
Update to a new pinning API.
Diffstat (limited to 'src/libstd/panic.rs')
| -rw-r--r-- | src/libstd/panic.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/panic.rs b/src/libstd/panic.rs index 47547aedcbd..bd7a92e9b3f 100644 --- a/src/libstd/panic.rs +++ b/src/libstd/panic.rs @@ -16,7 +16,7 @@ use any::Any; use cell::UnsafeCell; use fmt; use future::Future; -use pin::PinMut; +use pin::Pin; use ops::{Deref, DerefMut}; use panicking; use ptr::{Unique, NonNull}; @@ -327,9 +327,9 @@ impl<T: fmt::Debug> fmt::Debug for AssertUnwindSafe<T> { impl<'a, F: Future> Future for AssertUnwindSafe<F> { type Output = F::Output; - fn poll(self: PinMut<Self>, cx: &mut task::Context) -> Poll<Self::Output> { - let pinned_field = unsafe { PinMut::map_unchecked(self, |x| &mut x.0) }; - pinned_field.poll(cx) + fn poll(self: Pin<&mut Self>, cx: &mut task::Context) -> Poll<Self::Output> { + let pinned_field = unsafe { Pin::map_unchecked_mut(self, |x| &mut x.0) }; + F::poll(pinned_field, cx) } } |
