rust/clippy_utils/src
bors 53059792e9 Auto merge of #8071 - GuillaumeGomez:method-must-use, r=xFrednet
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
2021-12-08 19:09:25 +00:00
..
ast_utils
ast_utils.rs Merge remote-tracking branch 'upstream/master' into rustup 2021-11-18 12:22:00 +01:00
attrs.rs Added clippy::version attribute as lint metadata 2021-11-10 19:48:29 +01:00
comparisons.rs
consts.rs Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyup 2021-11-04 12:52:36 +00:00
diagnostics.rs Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyup 2021-11-04 12:52:36 +00:00
eager_or_lazy.rs Improve heuristics for determining whether eager of lazy evaluation is preferred 2021-11-15 20:54:13 -05:00
higher.rs Fix Clippy with changed for loop desugar 2021-11-21 08:16:09 -06:00
hir_utils.rs Apply new lint on clippy source code 2021-12-08 11:16:14 +01:00
lib.rs Auto merge of #8071 - GuillaumeGomez:method-must-use, r=xFrednet 2021-12-08 19:09:25 +00:00
msrvs.rs Auto merge of #7948 - 5225225:castlosslessbool, r=llogiq 2021-11-12 18:17:18 +00:00
numeric_literal.rs Merge commit 'b7f3f7f6082679da2da9a0b3faf1b5adef3afd3b' into clippyup 2021-10-07 11:21:30 +02:00
paths.rs Consider NonNull as a pointer type 2021-12-03 19:11:40 -05:00
ptr.rs Factor in some expr_visitor usages 2021-11-05 14:39:39 -05:00
qualify_min_const_fn.rs Rollup merge of #88963 - fee1-dead:const-iterator, r=oli-obk 2021-10-01 14:46:48 -07:00
source.rs fix dogfood lint on clippy_utils 2021-11-09 17:30:15 +00:00
str_utils.rs Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyup 2021-11-04 12:52:36 +00:00
sugg.rs Apply new lint on clippy source code 2021-12-08 11:16:14 +01:00
sym_helper.rs
ty.rs Improve heuristics for determining whether eager of lazy evaluation is preferred 2021-11-15 20:54:13 -05:00
usage.rs Factor in some expr_visitor usages 2021-11-05 14:39:39 -05:00
visitors.rs Remove surrounding unsafe block in strlen_on_c_strings when possible 2021-11-19 21:14:51 -05:00