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/liballoc | |
| 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/liballoc')
| -rw-r--r-- | src/liballoc/boxed.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index f6dee7c9eef..cb33b4d4784 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -81,7 +81,7 @@ use core::ops::{ CoerceUnsized, DispatchFromDyn, Deref, DerefMut, Receiver, Generator, GeneratorState }; use core::ptr::{self, NonNull, Unique}; -use core::task::{Waker, Poll}; +use core::task::{Context, Poll}; use crate::vec::Vec; use crate::raw_vec::RawVec; @@ -912,7 +912,7 @@ impl<G: ?Sized + Generator> Generator for Pin<Box<G>> { impl<F: ?Sized + Future + Unpin> Future for Box<F> { type Output = F::Output; - fn poll(mut self: Pin<&mut Self>, waker: &Waker) -> Poll<Self::Output> { - F::poll(Pin::new(&mut *self), waker) + fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> { + F::poll(Pin::new(&mut *self), cx) } } |
