diff options
| author | Josef Reinhard Brandl <mail@josefbrandl.de> | 2018-07-02 19:07:59 +0200 |
|---|---|---|
| committer | Josef Reinhard Brandl <mail@josefbrandl.de> | 2018-07-02 19:07:59 +0200 |
| commit | ae408947de1311f9673d0ae34028933cd191ac90 (patch) | |
| tree | 7c154be8dce7c95cb96d68d79040e96c5d1f4317 /src/liballoc | |
| parent | 5fde8b92372f02deaf5c7fb638447a60112f9015 (diff) | |
| download | rust-ae408947de1311f9673d0ae34028933cd191ac90.tar.gz rust-ae408947de1311f9673d0ae34028933cd191ac90.zip | |
Implement `UnsafeFutureObj` for `&mut Future`
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/boxed.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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<F: ?Sized + Future> Future for PinBox<F> { } #[unstable(feature = "futures_api", issue = "50547")] -unsafe impl<'a, T, F: Future<Output = T> + 'a> UnsafeFutureObj<'a, T> for PinBox<F> { +unsafe impl<'a, T, F> UnsafeFutureObj<'a, T> for PinBox<F> + where F: Future<Output = T> + 'a +{ fn into_raw(self) -> *mut () { PinBox::into_raw(self) as *mut () } |
