Skip to content

Commit 46a6831

Browse files
committed
fix futures aliasing mutable and shared ref
1 parent b68fc18 commit 46a6831

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/libstd/future.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ where
9595
});
9696
let _reset_waker = SetOnDrop(waker_ptr);
9797

98-
let mut waker_ptr = waker_ptr.expect(
98+
let waker_ptr = waker_ptr.expect(
9999
"TLS LocalWaker not set. This is a rustc bug. \
100100
Please file an issue on https://github.com/rust-lang/rust.");
101-
unsafe { f(waker_ptr.as_mut()) }
101+
unsafe { f(waker_ptr.as_ref()) }
102102
}
103103

104104
#[unstable(feature = "gen_future", issue = "50547")]

0 commit comments

Comments
 (0)