diff options
| author | Taylor Cramer <cramertj@google.com> | 2019-03-11 16:56:00 -0700 |
|---|---|---|
| committer | Taylor Cramer <cramertj@google.com> | 2019-04-05 15:03:33 -0700 |
| commit | 1691e06db661a19a5e25276c18cd165386f027bb (patch) | |
| tree | 8f48fcec3852c14a0df42fc5d795d76d2d39c8d1 /src/libstd/panic.rs | |
| parent | 20dbf28624db446c0cf67be4cc71a85931947907 (diff) | |
| download | rust-1691e06db661a19a5e25276c18cd165386f027bb.tar.gz rust-1691e06db661a19a5e25276c18cd165386f027bb.zip | |
Future-proof the Futures API
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) } } |
