We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6525ef commit 6d44293Copy full SHA for 6d44293
src/libcore/future/future.rs
@@ -23,7 +23,7 @@ use task::{Poll, LocalWaker};
23
///
24
/// When using a future, you generally won't call `poll` directly, but instead
25
/// `await!` the value.
26
-#[must_use]
+#[must_use = "futures do nothing unless polled"]
27
pub trait Future {
28
/// The result of the `Future`.
29
type Output;
src/libcore/iter/iterator.rs
@@ -88,7 +88,7 @@ fn _assert_is_object_safe(_: &dyn Iterator<Item=()>) {}
88
message="`{Self}` is not an iterator"
89
)]
90
#[doc(spotlight)]
91
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
92
pub trait Iterator {
93
/// The type of the elements being iterated over.
94
#[stable(feature = "rust1", since = "1.0.0")]
0 commit comments