about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authortinaun <tinagma@gmail.com>2018-06-08 23:16:51 -0400
committertinaun <tinagma@gmail.com>2018-06-08 23:16:51 -0400
commit49eb754cc0108d8546eae70cdcebf81aaddbece3 (patch)
tree9d88e5251bf6de92e7dfb800b5c7e1218e4f837e /src/liballoc
parent6e5c18e8dc94a679126d276884a3ad4b9a3e0934 (diff)
downloadrust-49eb754cc0108d8546eae70cdcebf81aaddbece3.tar.gz
rust-49eb754cc0108d8546eae70cdcebf81aaddbece3.zip
addressed nits
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/boxed.rs21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index 896d9dee3ee..c794fb8220a 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -933,27 +933,6 @@ impl<'a, F: ?Sized + Future> Future for PinBox<F> {
 }
 
 #[unstable(feature = "futures_api", issue = "50547")]
-unsafe impl<F: Future<Output = ()> + Send + 'static> UnsafePoll for Box<F> {
-    fn into_raw(self) -> *mut () {
-        unsafe {
-            mem::transmute(self)
-        }
-    }
-
-    unsafe fn poll(task: *mut (), cx: &mut Context) -> Poll<()> {
-        let ptr: *mut F = mem::transmute(task);
-        let pin: PinMut<F> = PinMut::new_unchecked(&mut *ptr);
-        pin.poll(cx)
-    }
-
-    unsafe fn drop(task: *mut ()) {
-        let ptr: *mut F = mem::transmute(task);
-        let boxed = Box::from_raw(ptr);
-        drop(boxed)
-    }
-}
-
-#[unstable(feature = "futures_api", issue = "50547")]
 unsafe impl<F: Future<Output = ()> + Send + 'static> UnsafePoll for PinBox<F> {
     fn into_raw(self) -> *mut () {
         PinBox::into_raw(self) as *mut ()