about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorTaylor Cramer <cramertj@google.com>2019-03-11 16:56:00 -0700
committerTaylor Cramer <cramertj@google.com>2019-04-05 15:03:33 -0700
commit1691e06db661a19a5e25276c18cd165386f027bb (patch)
tree8f48fcec3852c14a0df42fc5d795d76d2d39c8d1 /src/liballoc
parent20dbf28624db446c0cf67be4cc71a85931947907 (diff)
downloadrust-1691e06db661a19a5e25276c18cd165386f027bb.tar.gz
rust-1691e06db661a19a5e25276c18cd165386f027bb.zip
Future-proof the Futures API
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/boxed.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index b2315c6a739..d75a0c298c2 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;
@@ -914,7 +914,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)
     }
 }