about summary refs log tree commit diff
path: root/library/core/src/task
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2024-07-22 17:34:29 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2024-07-22 18:07:28 +0100
commitb18c7d85a92011bcc094b33e6a3c646a3cfca8f3 (patch)
treea1af453b9f974d25cee086c2df43c52542d5f826 /library/core/src/task
parentaee3dc4c6cc0e018b648a340fb98af10887ce4ba (diff)
Docs for Waker and LocalWaker: Add cross-refs in comment
Diffstat (limited to 'library/core/src/task')
-rw-r--r--library/core/src/task/wake.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/library/core/src/task/wake.rs b/library/core/src/task/wake.rs
index 86a965f68e0..4582bf9f422 100644
--- a/library/core/src/task/wake.rs
+++ b/library/core/src/task/wake.rs
@@ -531,6 +531,10 @@ impl Waker {
 
     /// Returns a reference to a `Waker` that does nothing when used.
     ///
+    // Note!  Much of the documentation for this method is duplicated
+    // in the docs for `LocalWaker::noop`.
+    // If you edit it, consider editing the other copy too.
+    //
     /// This is mostly useful for writing tests that need a [`Context`] to poll
     /// some futures, but are not expecting those futures to wake the waker or
     /// do not need to do anything specific if it happens.
@@ -784,6 +788,10 @@ impl LocalWaker {
 
     /// Creates a new `LocalWaker` that does nothing when `wake` is called.
     ///
+    // Note!  Much of the documentation for this method is duplicated
+    // in the docs for `Waker::noop`.
+    // If you edit it, consider editing the other copy too.
+    //
     /// This is mostly useful for writing tests that need a [`Context`] to poll
     /// some futures, but are not expecting those futures to wake the waker or
     /// do not need to do anything specific if it happens.