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
..
2021-10-15 12:44:49 -04:00
2021-10-15 12:44:49 -04:00
2021-10-15 12:44:49 -04:00
2021-10-26 13:55:51 -07:00
2021-10-26 09:05:28 +02:00
2021-10-26 09:05:28 +02:00
2021-10-15 12:44:49 -04:00
2021-10-19 14:33:43 -07:00
2021-10-19 14:33:43 -07:00
2021-10-13 20:05:05 +01:00
2021-10-09 05:47:07 -04:00
2021-10-27 06:32:37 -07:00
2021-10-27 06:32:37 -07:00