File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 6262 label="expected an `Fn<{Args}>` closure, found `{Self}`" ,
6363) ]
6464#[ fundamental] // so that regex can rely that `&str: !FnMut`
65- #[ must_use]
65+ #[ must_use = "closures are lazy and do nothing unless called" ]
6666pub trait Fn < Args > : FnMut < Args > {
6767 /// Performs the call operation.
6868 #[ unstable( feature = "fn_traits" , issue = "29625" ) ]
@@ -141,7 +141,7 @@ pub trait Fn<Args> : FnMut<Args> {
141141 label="expected an `FnMut<{Args}>` closure, found `{Self}`" ,
142142) ]
143143#[ fundamental] // so that regex can rely that `&str: !FnMut`
144- #[ must_use]
144+ #[ must_use = "closures are lazy and do nothing unless called" ]
145145pub trait FnMut < Args > : FnOnce < Args > {
146146 /// Performs the call operation.
147147 #[ unstable( feature = "fn_traits" , issue = "29625" ) ]
@@ -220,7 +220,7 @@ pub trait FnMut<Args> : FnOnce<Args> {
220220 label="expected an `FnOnce<{Args}>` closure, found `{Self}`" ,
221221) ]
222222#[ fundamental] // so that regex can rely that `&str: !FnMut`
223- #[ must_use]
223+ #[ must_use = "closures are lazy and do nothing unless called" ]
224224pub trait FnOnce < Args > {
225225 /// The returned type after the call operator is used.
226226 #[ stable( feature = "fn_once_output" , since = "1.12.0" ) ]
You can’t perform that action at this time.
0 commit comments