Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix futures creating aliasing mutable and shared ref #56319

Merged
merged 1 commit into from
Nov 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix futures aliasing mutable and shared ref
  • Loading branch information
RalfJung committed Nov 28, 2018
commit 46a683111d4827800aae5eab4875c23089dce17e
4 changes: 2 additions & 2 deletions src/libstd/future.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down