fix futures aliasing mutable and shared ref

This commit is contained in:
Ralf Jung 2018-11-28 19:29:03 +01:00
parent b68fc18c45
commit 46a683111d

View file

@ -95,10 +95,10 @@ where
});
let _reset_waker = SetOnDrop(waker_ptr);
let mut waker_ptr = waker_ptr.expect(
let waker_ptr = waker_ptr.expect(
"TLS LocalWaker not set. This is a rustc bug. \
Please file an issue on https://github.com/rust-lang/rust.");
unsafe { f(waker_ptr.as_mut()) }
unsafe { f(waker_ptr.as_ref()) }
}
#[unstable(feature = "gen_future", issue = "50547")]