diff --git a/src/libcore/ops/function.rs b/src/libcore/ops/function.rs index 3a1d765f7b816..c69f5fd989696 100644 --- a/src/libcore/ops/function.rs +++ b/src/libcore/ops/function.rs @@ -62,7 +62,7 @@ label="expected an `Fn<{Args}>` closure, found `{Self}`", )] #[fundamental] // so that regex can rely that `&str: !FnMut` -#[must_use] +#[must_use = "closures are lazy and do nothing unless called"] pub trait Fn : FnMut { /// Performs the call operation. #[unstable(feature = "fn_traits", issue = "29625")] @@ -141,7 +141,7 @@ pub trait Fn : FnMut { label="expected an `FnMut<{Args}>` closure, found `{Self}`", )] #[fundamental] // so that regex can rely that `&str: !FnMut` -#[must_use] +#[must_use = "closures are lazy and do nothing unless called"] pub trait FnMut : FnOnce { /// Performs the call operation. #[unstable(feature = "fn_traits", issue = "29625")] @@ -220,7 +220,7 @@ pub trait FnMut : FnOnce { label="expected an `FnOnce<{Args}>` closure, found `{Self}`", )] #[fundamental] // so that regex can rely that `&str: !FnMut` -#[must_use] +#[must_use = "closures are lazy and do nothing unless called"] pub trait FnOnce { /// The returned type after the call operator is used. #[stable(feature = "fn_once_output", since = "1.12.0")]