diff options
| author | bors <bors@rust-lang.org> | 2018-09-19 06:56:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-09-19 06:56:19 +0000 |
| commit | 1e21c9a297a9fe668d62887a3a6a4add8e717b17 (patch) | |
| tree | e027144fdbb18bb3d12fe5b63fff4a605e65c372 /src/libstd/panic.rs | |
| parent | ff6422d7a392acfc8af28994d65af2bbaecea4f6 (diff) | |
| parent | 574bca7262f0ddab9e1818253012dbff34755b98 (diff) | |
Auto merge of #53877 - withoutboats:compositional-pin, r=aturon
Update to a new pinning API. ~~Blocked on #53843 because of method resolution problems with new pin type.~~ @r? @cramertj cc @RalfJung @pythonesque anyone interested in #49150
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) } } |
