mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-16 18:44:56 +00:00
53059792e9
Add new lint to warn when #[must_use] attribute should be used on a method This lint is somewhat similar to https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate but also different: it emits a warning by default and only targets methods (so not functions nor associated functions). Someone suggested it to me after this tweet: https://twitter.com/m_ou_se/status/1466439813230477312 I think it would reduce the number of cases of API misuses quite a lot. What do you think? --- changelog: Added new [`return_self_not_must_use`] lint |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |