about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorJosef Reinhard Brandl <mail@josefbrandl.de>2018-06-13 09:09:57 +0200
committerJosef Reinhard Brandl <mail@josefbrandl.de>2018-06-13 09:32:59 +0200
commit2177378e34c5ad431b245e3bd7cd6cd38ab9053a (patch)
tree1424ea1552ce012efc2303394ca50da4e000022d /src/liballoc
parent8398ab82e5d6623f49f054af848f1553f429d307 (diff)
downloadrust-2177378e34c5ad431b245e3bd7cd6cd38ab9053a.tar.gz
rust-2177378e34c5ad431b245e3bd7cd6cd38ab9053a.zip
Improve core::task::TaskObj
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/boxed.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index c794fb8220a..ea60c7775af 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -66,7 +66,7 @@ use core::marker::{Unpin, Unsize};
 use core::mem::{self, PinMut};
 use core::ops::{CoerceUnsized, Deref, DerefMut, Generator, GeneratorState};
 use core::ptr::{self, NonNull, Unique};
-use core::task::{Context, Poll, UnsafePoll, TaskObj};
+use core::task::{Context, Poll, UnsafeTask, TaskObj};
 use core::convert::From;
 
 use raw_vec::RawVec;
@@ -933,7 +933,7 @@ impl<'a, F: ?Sized + Future> Future for PinBox<F> {
 }
 
 #[unstable(feature = "futures_api", issue = "50547")]
-unsafe impl<F: Future<Output = ()> + Send + 'static> UnsafePoll for PinBox<F> {
+unsafe impl<F: Future<Output = ()> + Send + 'static> UnsafeTask for PinBox<F> {
     fn into_raw(self) -> *mut () {
         PinBox::into_raw(self) as *mut ()
     }
@@ -952,13 +952,13 @@ unsafe impl<F: Future<Output = ()> + Send + 'static> UnsafePoll for PinBox<F> {
 #[unstable(feature = "futures_api", issue = "50547")]
 impl<F: Future<Output = ()> + Send + 'static> From<PinBox<F>> for TaskObj {
     fn from(boxed: PinBox<F>) -> Self {
-        TaskObj::from_poll_task(boxed)
+        TaskObj::new(boxed)
     }
 }
 
 #[unstable(feature = "futures_api", issue = "50547")]
 impl<F: Future<Output = ()> + Send + 'static> From<Box<F>> for TaskObj {
     fn from(boxed: Box<F>) -> Self {
-        TaskObj::from_poll_task(PinBox::from(boxed))
+        TaskObj::new(PinBox::from(boxed))
     }
 }