File tree 3 files changed +5
-0
lines changed
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};
33
33
///
34
34
/// When using a future, you generally won't call `poll` directly, but instead
35
35
/// `await!` the value.
36
+ #[ must_use]
36
37
pub trait Future {
37
38
/// The result of the `Future`.
38
39
type Output ;
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ fn _assert_is_object_safe(_: &dyn Iterator<Item=()>) {}
98
98
message="`{Self}` is not an iterator"
99
99
) ]
100
100
#[ doc( spotlight) ]
101
+ #[ must_use]
101
102
pub trait Iterator {
102
103
/// The type of the elements being iterated over.
103
104
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
Original file line number Diff line number Diff line change 72
72
label="expected an `Fn<{Args}>` closure, found `{Self}`" ,
73
73
) ]
74
74
#[ fundamental] // so that regex can rely that `&str: !FnMut`
75
+ #[ must_use]
75
76
pub trait Fn < Args > : FnMut < Args > {
76
77
/// Performs the call operation.
77
78
#[ unstable( feature = "fn_traits" , issue = "29625" ) ]
@@ -150,6 +151,7 @@ pub trait Fn<Args> : FnMut<Args> {
150
151
label="expected an `FnMut<{Args}>` closure, found `{Self}`" ,
151
152
) ]
152
153
#[ fundamental] // so that regex can rely that `&str: !FnMut`
154
+ #[ must_use]
153
155
pub trait FnMut < Args > : FnOnce < Args > {
154
156
/// Performs the call operation.
155
157
#[ unstable( feature = "fn_traits" , issue = "29625" ) ]
@@ -228,6 +230,7 @@ pub trait FnMut<Args> : FnOnce<Args> {
228
230
label="expected an `FnOnce<{Args}>` closure, found `{Self}`" ,
229
231
) ]
230
232
#[ fundamental] // so that regex can rely that `&str: !FnMut`
233
+ #[ must_use]
231
234
pub trait FnOnce < Args > {
232
235
/// The returned type after the call operator is used.
233
236
#[ stable( feature = "fn_once_output" , since = "1.12.0" ) ]
You can’t perform that action at this time.
0 commit comments