From 3ec1810e329bb9dfa0cf0686bdc13558771785d2 Mon Sep 17 00:00:00 2001 From: Taylor Cramer Date: Fri, 14 Sep 2018 17:40:52 -0700 Subject: Cleanup and fix method resolution issue --- src/libcore/future/future.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/libcore/future') diff --git a/src/libcore/future/future.rs b/src/libcore/future/future.rs index 6cf1925000e..f4b5cf95e37 100644 --- a/src/libcore/future/future.rs +++ b/src/libcore/future/future.rs @@ -104,14 +104,14 @@ impl<'a, F: ?Sized + Future + Unpin> Future for &'a mut F { } } -impl Future for Pin

where - P: ops::DerefMut + Unpin, - F: Future + ?Sized, +impl

Future for Pin

+where + P: ops::DerefMut, + P::Target: Future, { - type Output = F::Output; + type Output = <

::Target as Future>::Output; - fn poll(mut self: Pin<&mut Self>, cx: &mut task::Context) -> Poll { - let pin: Pin<&mut F> = Pin::as_mut(&mut *self); - F::poll(pin, cx) + fn poll(self: Pin<&mut Self>, cx: &mut task::Context) -> Poll { + Pin::get_mut(self).as_mut().poll(cx) } } -- cgit 1.4.1-3-g733a5