]> git.lizzy.rs Git - rust.git/commitdiff
Improve the "must use" lint for `Future`
authorBenjamin Schultzer <Schultzer@users.noreply.github.com>
Mon, 13 May 2019 22:13:17 +0000 (15:13 -0700)
committerBenjamin Schultzer <benjamin@schultzer.com>
Mon, 13 May 2019 23:01:20 +0000 (16:01 -0700)
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
src/libcore/future/future.rs

index 504330a023b31408115f2c8fbdb8c902d25fcf36..3f76ac20192ba092734225342772b827165e627b 100644 (file)
@@ -23,7 +23,7 @@
 /// When using a future, you generally won't call `poll` directly, but instead
 /// `await!` the value.
 #[doc(spotlight)]
-#[must_use = "futures do nothing unless polled"]
+#[must_use = "futures do nothing unless you `.await` or poll them"]
 #[stable(feature = "futures_api", since = "1.36.0")]
 pub trait Future {
     /// The type of value produced on completion.