From ae408947de1311f9673d0ae34028933cd191ac90 Mon Sep 17 00:00:00 2001 From: Josef Reinhard Brandl Date: Mon, 2 Jul 2018 19:07:59 +0200 Subject: Implement `UnsafeFutureObj` for `&mut Future` --- src/liballoc/boxed.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/liballoc') diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 7f6d27088b7..fabeaa1c144 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -933,7 +933,9 @@ impl Future for PinBox { } #[unstable(feature = "futures_api", issue = "50547")] -unsafe impl<'a, T, F: Future + 'a> UnsafeFutureObj<'a, T> for PinBox { +unsafe impl<'a, T, F> UnsafeFutureObj<'a, T> for PinBox + where F: Future + 'a +{ fn into_raw(self) -> *mut () { PinBox::into_raw(self) as *mut () } -- cgit 1.4.1-3-g733a5