Skip to content

Commit 6ad1912

Browse files
authored
task: add #[must_use] to JoinHandle::abort_handle (#6762)
1 parent a491b16 commit 6ad1912

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tokio/src/runtime/task/join.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ impl<T> JoinHandle<T> {
296296
/// # }
297297
/// ```
298298
/// [cancelled]: method@super::error::JoinError::is_cancelled
299+
#[must_use = "abort handles do nothing unless `.abort` is called"]
299300
pub fn abort_handle(&self) -> super::AbortHandle {
300301
self.raw.ref_inc();
301302
super::AbortHandle::new(self.raw)

0 commit comments

Comments
 (0)