@@ -284,7 +284,7 @@ impl fmt::Debug for Context<'_> {
284284/// use std::future::Future;
285285///
286286/// let local_waker = LocalWaker::noop();
287- /// let waker = Waker::noop() ;
287+ /// let waker = Waker::NOOP ;
288288///
289289/// let mut cx = ContextBuilder::from_waker(&waker)
290290/// .local_waker(&local_waker)
@@ -465,7 +465,7 @@ impl Waker {
465465 Waker { waker }
466466 }
467467
468- /// Returns a reference to a `Waker` that does nothing when used.
468+ /// A reference to a `Waker` that does nothing when used.
469469 ///
470470 /// This is mostly useful for writing tests that need a [`Context`] to poll
471471 /// some futures, but are not expecting those futures to wake the waker or
@@ -481,18 +481,13 @@ impl Waker {
481481 /// use std::future::Future;
482482 /// use std::task;
483483 ///
484- /// let mut cx = task::Context::from_waker(task::Waker::noop() );
484+ /// let mut cx = task::Context::from_waker(task::Waker::NOOP );
485485 ///
486486 /// let mut future = Box::pin(async { 10 });
487487 /// assert_eq!(future.as_mut().poll(&mut cx), task::Poll::Ready(10));
488488 /// ```
489- #[ inline]
490- #[ must_use]
491489 #[ unstable( feature = "noop_waker" , issue = "98286" ) ]
492- pub const fn noop ( ) -> & ' static Waker {
493- const WAKER : & Waker = & Waker { waker : RawWaker :: NOOP } ;
494- WAKER
495- }
490+ pub const NOOP : & ' static Waker = & Waker { waker : RawWaker :: NOOP } ;
496491
497492 /// Get a reference to the underlying [`RawWaker`].
498493 #[ inline]
@@ -697,7 +692,7 @@ impl LocalWaker {
697692 /// use std::future::Future;
698693 /// use std::task::{ContextBuilder, LocalWaker, Waker, Poll};
699694 ///
700- /// let mut cx = ContextBuilder::from_waker(Waker::noop() )
695+ /// let mut cx = ContextBuilder::from_waker(Waker::NOOP )
701696 /// .local_waker(LocalWaker::noop())
702697 /// .build();
703698 ///
0 commit comments