Skip to content

Commit 180c68b

Browse files
committed
doc: fix some doctests after rebase
1 parent 038c6e0 commit 180c68b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

library/alloc/src/task.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@ fn raw_waker<W: Wake + Send + Sync + 'static>(waker: Arc<W>) -> RawWaker {
227227
/// // we exit, since there are no more tasks remaining on the queue
228228
/// return;
229229
/// };
230-
/// let waker = Waker::noop();
230+
///
231231
/// // cast the Rc<Task> into a `LocalWaker`
232232
/// let local_waker: LocalWaker = task.clone().into();
233233
/// // Build the context using `ContextBuilder`
234-
/// let mut cx = ContextBuilder::from_waker(&waker)
234+
/// let mut cx = ContextBuilder::from_waker(Waker::noop())
235235
/// .local_waker(&local_waker)
236236
/// .build();
237237
///

library/core/src/task/wake.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -673,14 +673,14 @@ impl LocalWaker {
673673
/// #![feature(noop_waker)]
674674
///
675675
/// use std::future::Future;
676-
/// use std::task::{ContextBuilder, LocalWaker};
676+
/// use std::task::{ContextBuilder, LocalWaker, Waker, Poll};
677677
///
678-
/// let mut cx = task::ContextBuilder::from_waker(Waker::noop())
678+
/// let mut cx = ContextBuilder::from_waker(Waker::noop())
679679
/// .local_waker(LocalWaker::noop())
680680
/// .build();
681681
///
682682
/// let mut future = Box::pin(async { 10 });
683-
/// assert_eq!(future.as_mut().poll(&mut cx), task::Poll::Ready(10));
683+
/// assert_eq!(future.as_mut().poll(&mut cx), Poll::Ready(10));
684684
/// ```
685685
#[inline]
686686
#[must_use]

0 commit comments

Comments
 (0)