Skip to content

Commit f5bc109

Browse files
authored
Rollup merge of rust-lang#53507 - phungleson:fix-impl-from-for-waker, r=cramertj
Add doc for impl From for Waker As part of issue rust-lang#51430 (cc @skade). The impl is very simple, so not sure if we need to go into any details.
2 parents f99911a + 3539132 commit f5bc109

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/libcore/task/wake.rs

+5
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ impl LocalWaker {
188188
}
189189

190190
impl From<LocalWaker> for Waker {
191+
/// Converts a `LocalWaker` into a `Waker`.
192+
///
193+
/// This conversion turns a `!Sync` `LocalWaker` into a `Sync` `Waker`, allowing a wakeup
194+
/// object to be sent to another thread, but giving up its ability to do specialized
195+
/// thread-local wakeup behavior.
191196
#[inline]
192197
fn from(local_waker: LocalWaker) -> Self {
193198
local_waker.0

0 commit comments

Comments
 (0)