Skip to content

Commit 1bef503

Browse files
authored
Improve "must use" lint for Future
This fixes rust-lang#60797
1 parent a9ec99f commit 1bef503

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 stay idle unless you await 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)