Skip to content

Commit

Permalink
fix futures aliasing mutable and shared ref
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Nov 28, 2018
1 parent b68fc18 commit 46a6831
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 46a6831

Please sign in to comment.