From 49eb754cc0108d8546eae70cdcebf81aaddbece3 Mon Sep 17 00:00:00 2001 From: tinaun Date: Fri, 8 Jun 2018 23:16:51 -0400 Subject: addressed nits --- src/liballoc/boxed.rs | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src/liballoc') 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 @@ -932,27 +932,6 @@ impl<'a, F: ?Sized + Future> Future for PinBox { } } -#[unstable(feature = "futures_api", issue = "50547")] -unsafe impl + Send + 'static> UnsafePoll for Box { - 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 = 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 + Send + 'static> UnsafePoll for PinBox { fn into_raw(self) -> *mut () { -- cgit 1.4.1-3-g733a5