]> git.lizzy.rs Git - rust.git/blob - src/docs/module_name_repetitions.txt
Add iter_kv_map lint
[rust.git] / src / docs / module_name_repetitions.txt
1 ### What it does
2 Detects type names that are prefixed or suffixed by the
3 containing module's name.
4
5 ### Why is this bad?
6 It requires the user to type the module name twice.
7
8 ### Example
9 ```
10 mod cake {
11     struct BlackForestCake;
12 }
13 ```
14
15 Use instead:
16 ```
17 mod cake {
18     struct BlackForest;
19 }
20 ```