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-10-04 19:38:04 +0000
committerbors <bors@rust-lang.org>2021-10-04 19:38:04 +0000
commitabe551ecb7f0f6223f3d343a591eb34d0b332708 (patch)
tree6b69b79f7c3c371dda4a7a4860d4913298a7cda3 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent3311b366e96b38f151a986f18ee0ede093fd04ad (diff)
parent388a3d098358edd1f7b83f1f47f1e1e157bad067 (diff)
downloadrust-abe551ecb7f0f6223f3d343a591eb34d0b332708.tar.gz
rust-abe551ecb7f0f6223f3d343a591eb34d0b332708.zip
Auto merge of #7762 - HKalbasi:master, r=Manishearth
Add lint `equatable_if_let`

This is my attempt for #1716. There is a major false positive, which is people may implement `PartialEq` in a different way. It is unactionable at the moment so I put it into `nursery`.

There is a trait `StructuralPartialEq` for solving this problem which is promising but it has several problems currently:
* Integers and tuples doesn't implement it.
* Some types wrongly implement it, like `Option<T>` when `T` doesn't implement it.

I consider them bugs and against the propose of `StructuralPartialEq`. When they become fixed, this lint can become a useful lint with a single line change.

changelog: New lint: [`equatable_if_let`]
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions