]> git.lizzy.rs Git - rust.git/blob - src/docs/missing_enforced_import_renames.txt
Merge remote-tracking branch 'upstream/master' into rustup
[rust.git] / src / docs / missing_enforced_import_renames.txt
1 ### What it does
2 Checks for imports that do not rename the item as specified
3 in the `enforce-import-renames` config option.
4
5 ### Why is this bad?
6 Consistency is important, if a project has defined import
7 renames they should be followed. More practically, some item names are too
8 vague outside of their defining scope this can enforce a more meaningful naming.
9
10 ### Example
11 An example clippy.toml configuration:
12 ```
13 enforced-import-renames = [ { path = "serde_json::Value", rename = "JsonValue" }]
14 ```
15
16 ```
17 use serde_json::Value;
18 ```
19 Use instead:
20 ```
21 use serde_json::Value as JsonValue;
22 ```