diff options
| author | bors <bors@rust-lang.org> | 2019-04-07 09:48:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-04-07 09:48:12 +0000 |
| commit | 4fb888bf04d2f1913e78e9eae51ac5695df1dc01 (patch) | |
| tree | 514cc7638f219d6113118c4df39fda52e08f5c44 /src/libstd/panic.rs | |
| parent | dec0a98c4b392b5fd153ba8b944c496218717813 (diff) | |
| parent | 1691e06db661a19a5e25276c18cd165386f027bb (diff) | |
| download | rust-4fb888bf04d2f1913e78e9eae51ac5695df1dc01.tar.gz rust-4fb888bf04d2f1913e78e9eae51ac5695df1dc01.zip | |
Auto merge of #59119 - cramertj:cx-back, r=withoutboats
Future-proof the Futures API cc https://github.com/rust-lang/rust/issues/59113, @carllerche, @rust-lang/libs r? @withoutboats
Diffstat (limited to 'src/libstd/panic.rs')
| -rw-r--r-- | src/libstd/panic.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/panic.rs b/src/libstd/panic.rs index cc147d851de..5a8101e2301 100644 --- a/src/libstd/panic.rs +++ b/src/libstd/panic.rs @@ -12,7 +12,7 @@ use crate::panicking; use crate::ptr::{Unique, NonNull}; use crate::rc::Rc; use crate::sync::{Arc, Mutex, RwLock, atomic}; -use crate::task::{Waker, Poll}; +use crate::task::{Context, Poll}; use crate::thread::Result; #[stable(feature = "panic_hooks", since = "1.10.0")] @@ -323,9 +323,9 @@ impl<T: fmt::Debug> fmt::Debug for AssertUnwindSafe<T> { impl<F: Future> Future for AssertUnwindSafe<F> { type Output = F::Output; - fn poll(self: Pin<&mut Self>, waker: &Waker) -> Poll<Self::Output> { + fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> { let pinned_field = unsafe { Pin::map_unchecked_mut(self, |x| &mut x.0) }; - F::poll(pinned_field, waker) + F::poll(pinned_field, cx) } } |
