File tree 2 files changed +5
-6
lines changed
2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -168,14 +168,14 @@ fn raw_waker<W: Wake + Send + Sync + 'static>(waker: Arc<W>) -> RawWaker {
168
168
/// to hold data that does not implement `Send` and `Sync`. Additionally, it saves calls
169
169
/// to `Arc::clone`, which requires atomic synchronization.
170
170
///
171
-
171
+ ///
172
172
/// # Examples
173
173
///
174
174
/// This is a simplified example of a `spawn` and a `block_on` function. The `spawn` function
175
175
/// is used to push new tasks onto the run queue, while the block on function will remove them
176
176
/// and poll them. When a task is woken, it will put itself back on the run queue to be polled by the executor.
177
177
///
178
- /// **Note:** A real world example would interlieve poll calls with calls to an io reactor to wait for events instead
178
+ /// **Note:** A real world example would interleave poll calls with calls to an io reactor to wait for events instead
179
179
/// of spinning on a loop.
180
180
///
181
181
/// ```rust
@@ -221,7 +221,7 @@ fn raw_waker<W: Wake + Send + Sync + 'static>(waker: Arc<W>) -> RawWaker {
221
221
/// {
222
222
/// spawn(future);
223
223
/// loop {
224
- /// let Some(task) = RUN_QUEUE.with_borrow_mut(|queue|queue.pop_front()) else {
224
+ /// let Some(task) = RUN_QUEUE.with_borrow_mut(|queue| queue.pop_front()) else {
225
225
/// // we exit, since there are no more tasks remaining on the queue
226
226
/// return;
227
227
/// };
Original file line number Diff line number Diff line change @@ -332,7 +332,6 @@ impl<'a> ContextBuilder<'a> {
332
332
}
333
333
334
334
/// This field is used to set the value of the waker on `Context`.
335
-
336
335
#[ inline]
337
336
#[ rustc_const_unstable( feature = "const_waker" , issue = "102012" ) ]
338
337
#[ unstable( feature = "local_waker" , issue = "118959" ) ]
@@ -598,6 +597,7 @@ impl fmt::Debug for Waker {
598
597
}
599
598
600
599
/// A `LocalWaker` is analogous to a [`Waker`], but it does not implement [`Send`] or [`Sync`].
600
+ ///
601
601
/// This handle encapsulates a [`RawWaker`] instance, which defines the
602
602
/// executor-specific wakeup behavior.
603
603
///
@@ -646,9 +646,8 @@ impl fmt::Debug for Waker {
646
646
/// [`Future::poll()`]: core::future::Future::poll
647
647
/// [`Poll::Pending`]: core::task::Poll::Pending
648
648
/// [`local_waker`]: core::task::Context::local_waker
649
-
650
649
#[ unstable( feature = "local_waker" , issue = "118959" ) ]
651
- #[ repr( transparent) ]
650
+ #[ cfg_attr ( not ( doc ) , repr( transparent) ) ] // work around https://github.com/rust-lang/rust/issues/66401
652
651
pub struct LocalWaker {
653
652
waker : RawWaker ,
654
653
}
You can’t perform that action at this time.
0 commit comments