File tree Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ use task::{Poll, LocalWaker};
3333///
3434/// When using a future, you generally won't call `poll` directly, but instead
3535/// `await!` the value.
36+ #[ must_use]
3637pub trait Future {
3738 /// The result of the `Future`.
3839 type Output ;
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ fn _assert_is_object_safe(_: &dyn Iterator<Item=()>) {}
9898 message="`{Self}` is not an iterator"
9999) ]
100100#[ doc( spotlight) ]
101+ #[ must_use]
101102pub trait Iterator {
102103 /// The type of the elements being iterated over.
103104 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
Original file line number Diff line number Diff line change 7272 label="expected an `Fn<{Args}>` closure, found `{Self}`" ,
7373) ]
7474#[ fundamental] // so that regex can rely that `&str: !FnMut`
75+ #[ must_use]
7576pub trait Fn < Args > : FnMut < Args > {
7677 /// Performs the call operation.
7778 #[ unstable( feature = "fn_traits" , issue = "29625" ) ]
@@ -150,6 +151,7 @@ pub trait Fn<Args> : FnMut<Args> {
150151 label="expected an `FnMut<{Args}>` closure, found `{Self}`" ,
151152) ]
152153#[ fundamental] // so that regex can rely that `&str: !FnMut`
154+ #[ must_use]
153155pub trait FnMut < Args > : FnOnce < Args > {
154156 /// Performs the call operation.
155157 #[ unstable( feature = "fn_traits" , issue = "29625" ) ]
@@ -228,6 +230,7 @@ pub trait FnMut<Args> : FnOnce<Args> {
228230 label="expected an `FnOnce<{Args}>` closure, found `{Self}`" ,
229231) ]
230232#[ fundamental] // so that regex can rely that `&str: !FnMut`
233+ #[ must_use]
231234pub trait FnOnce < Args > {
232235 /// The returned type after the call operator is used.
233236 #[ stable( feature = "fn_once_output" , since = "1.12.0" ) ]
You can’t perform that action at this time.
0 commit comments