about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-12-08 19:09:25 +0000
committerbors <bors@rust-lang.org>2021-12-08 19:09:25 +0000
commit53059792e9a7b7adeff387ceb995a50a6c33b3fa (patch)
tree8b2ab65d10d1b20411831d54ca35928542510250 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent3c8f90bd5a03872a9b9088facc3bf9ec8ac42dd0 (diff)
parente93767b395ca18ac895e0d52520c2586b7aae0e6 (diff)
downloadrust-53059792e9a7b7adeff387ceb995a50a6c33b3fa.tar.gz
rust-53059792e9a7b7adeff387ceb995a50a6c33b3fa.zip
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
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions