Skip to content

Commit 58c6a94

Browse files
SchultzerCentril
andcommitted
Improve the "must use" lint for Future
Co-Authored-By: Mazdak Farrokhzad <[email protected]>
1 parent a9ec99f commit 58c6a94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/future/future.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use crate::task::{Context, Poll};
2323
/// When using a future, you generally won't call `poll` directly, but instead
2424
/// `await!` the value.
2525
#[doc(spotlight)]
26-
#[must_use = "futures do nothing unless polled"]
26+
#[must_use = "futures do nothing unless you `.await` or poll them"]
2727
#[stable(feature = "futures_api", since = "1.36.0")]
2828
pub trait Future {
2929
/// The type of value produced on completion.

0 commit comments

Comments
 (0)