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.
This commit is contained in:
Pietro Albini 2018-10-25 14:30:56 +02:00 committed by GitHub
commit 18f7d41a65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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