File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 62
62
label="expected an `Fn<{Args}>` closure, found `{Self}`" ,
63
63
) ]
64
64
#[ fundamental] // so that regex can rely that `&str: !FnMut`
65
- #[ must_use]
65
+ #[ must_use = "closures are lazy and do nothing unless called" ]
66
66
pub trait Fn < Args > : FnMut < Args > {
67
67
/// Performs the call operation.
68
68
#[ unstable( feature = "fn_traits" , issue = "29625" ) ]
@@ -141,7 +141,7 @@ pub trait Fn<Args> : FnMut<Args> {
141
141
label="expected an `FnMut<{Args}>` closure, found `{Self}`" ,
142
142
) ]
143
143
#[ fundamental] // so that regex can rely that `&str: !FnMut`
144
- #[ must_use]
144
+ #[ must_use = "closures are lazy and do nothing unless called" ]
145
145
pub trait FnMut < Args > : FnOnce < Args > {
146
146
/// Performs the call operation.
147
147
#[ unstable( feature = "fn_traits" , issue = "29625" ) ]
@@ -220,7 +220,7 @@ pub trait FnMut<Args> : FnOnce<Args> {
220
220
label="expected an `FnOnce<{Args}>` closure, found `{Self}`" ,
221
221
) ]
222
222
#[ fundamental] // so that regex can rely that `&str: !FnMut`
223
- #[ must_use]
223
+ #[ must_use = "closures are lazy and do nothing unless called" ]
224
224
pub trait FnOnce < Args > {
225
225
/// The returned type after the call operator is used.
226
226
#[ stable( feature = "fn_once_output" , since = "1.12.0" ) ]
You can’t perform that action at this time.
0 commit comments