diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2018-10-25 14:30:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-25 14:30:56 +0200 |
| commit | 18f7d41a654307bb883fed660e53df78b00287d0 (patch) | |
| tree | fda9d5052e87a6277d7ac69c85c50930bd3669d3 /src/libcore | |
| parent | 365b9001e588cf3d91561894b0e44389e31ae000 (diff) | |
| parent | 35391326a6e59fb80f851a8345f577a2527eae3c (diff) | |
| download | rust-18f7d41a654307bb883fed660e53df78b00287d0.tar.gz rust-18f7d41a654307bb883fed660e53df78b00287d0.zip | |
Rollup merge of #53507 - phungleson:fix-impl-from-for-waker, r=cramertj
Add doc for impl From for Waker As part of issue #51430 (cc @skade). The impl is very simple, so not sure if we need to go into any details.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/task/wake.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libcore/task/wake.rs b/src/libcore/task/wake.rs index ab4ae50c443..c9fb22e0080 100644 --- a/src/libcore/task/wake.rs +++ b/src/libcore/task/wake.rs @@ -188,6 +188,11 @@ impl LocalWaker { } impl From<LocalWaker> for Waker { + /// Converts a `LocalWaker` into a `Waker`. + /// + /// This conversion turns a `!Sync` `LocalWaker` into a `Sync` `Waker`, allowing a wakeup + /// object to be sent to another thread, but giving up its ability to do specialized + /// thread-local wakeup behavior. #[inline] fn from(local_waker: LocalWaker) -> Self { local_waker.0 |
