Skip to content

Commit

Permalink
Fix UB due to missing 'static on task::waker (#2206)
Browse files Browse the repository at this point in the history
  • Loading branch information
Darksonn committed Sep 5, 2020
1 parent 8c2affe commit 4d54611
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion futures-task/src/waker.rs
Expand Up @@ -18,7 +18,7 @@ pub(super) fn waker_vtable<W: ArcWake>() -> &'static RawWakerVTable {
/// [`ArcWake.wake()`](ArcWake::wake) if awoken.
pub fn waker<W>(wake: Arc<W>) -> Waker
where
W: ArcWake,
W: ArcWake + 'static,
{
let ptr = Arc::into_raw(wake) as *const ();

Expand Down

0 comments on commit 4d54611

Please sign in to comment.