rust-clippy/clippy_lints
bors 962e21cf15 Auto merge of #7875 - mbStavola:unit-hash, r=xFrednet
Add unit-hash lint

changelog: [`unit_hash`] Add lint for hashing unit values

This will lint for situations where the end user is attempting to hash a unit value (`()`), as the implementation in `std` simply [does nothing][impl]. Closes #7159 .

Example:

```rust
().hash(&mut state);

// Should (probably) be replaced with:
0_u8.hash(&mut state);
```

[impl]: a5f164faad/library/core/src/hash/mod.rs (L656)
2021-10-27 14:37:54 +00:00
..
src Auto merge of #7875 - mbStavola:unit-hash, r=xFrednet 2021-10-27 14:37:54 +00:00
Cargo.toml Bump Clippy Version -> 0.1.58 2021-10-21 12:19:32 +02:00
README.md clippy_lints: readme: don't mention crates.io since it is no longer used to publish clippy. 2020-03-10 01:05:54 +01:00

This crate contains Clippy lints. For the main crate, check GitHub.