]> git.lizzy.rs Git - rust.git/blob - src/docs/unnecessary_self_imports.txt
Auto merge of #9475 - Nemo157:mod-files-remap, r=xFrednet
[rust.git] / src / docs / unnecessary_self_imports.txt
1 ### What it does
2 Checks for imports ending in `::{self}`.
3
4 ### Why is this bad?
5 In most cases, this can be written much more cleanly by omitting `::{self}`.
6
7 ### Known problems
8 Removing `::{self}` will cause any non-module items at the same path to also be imported.
9 This might cause a naming conflict (https://github.com/rust-lang/rustfmt/issues/3568). This lint makes no attempt
10 to detect this scenario and that is why it is a restriction lint.
11
12 ### Example
13 ```
14 use std::io::{self};
15 ```
16 Use instead:
17 ```
18 use std::io;
19 ```