diff options
| author | Ralf Jung <post@ralfj.de> | 2018-11-28 19:29:03 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2018-11-28 19:30:11 +0100 |
| commit | 46a683111d4827800aae5eab4875c23089dce17e (patch) | |
| tree | 1e011d775bede54e65c43cc2227588e24438f515 /src/libstd | |
| parent | b68fc18c45350e1cdcd83cecf0f12e294e55af56 (diff) | |
| download | rust-46a683111d4827800aae5eab4875c23089dce17e.tar.gz rust-46a683111d4827800aae5eab4875c23089dce17e.zip | |
fix futures aliasing mutable and shared ref
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/future.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/future.rs b/src/libstd/future.rs index 1cadbdc66c3..d5e6cab948b 100644 --- a/src/libstd/future.rs +++ b/src/libstd/future.rs @@ -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")] |
