fix futures aliasing mutable and shared ref
This commit is contained in:
parent
b68fc18c45
commit
46a683111d
1 changed files with 2 additions and 2 deletions
|
@ -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")]
|
||||
|
|
Loading…
Add table
Reference in a new issue