about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-05-15 03:52:37 +0000
committerbors <bors@rust-lang.org>2022-05-15 03:52:37 +0000
commitc10bfae6585c1f4291dabab618f0bd0b24577293 (patch)
tree457856f7a8fa6b31882c960bd7021289535d8455 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
parent2038084cf2253b57cf8b405ab000a92b68346f43 (diff)
parent1f79a442e561521d0efae15da3da8acf17b580c2 (diff)
downloadrust-c10bfae6585c1f4291dabab618f0bd0b24577293.tar.gz
rust-c10bfae6585c1f4291dabab618f0bd0b24577293.zip
Auto merge of #8832 - Alexendoo:duplicate-mod, r=Manishearth
Add `duplicate_mod` lint

Inspired by #8827, warns if there's a single file that is loaded by more than one `mod` item

```rust,ignore
// lib.rs
mod a;
mod b;
```
```rust,ignore
// a.rs
#[path = "./b.rs"]
mod b;
```

It adds a `canonicalize` call per `mod file;` encountered, which I don't think should be too heavy

Integration tests with common modules, e.g. [`test_utils`](https://github.com/rust-lang/rust-clippy/tree/2038084cf2253b57cf8b405ab000a92b68346f43/tests/test_utils) doesn't trigger it as each test is compiled separately, however I couldn't figure out a good way to add a test for that

changelog: Add [`duplicate_mod`] lint
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs')
0 files changed, 0 insertions, 0 deletions