File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,25 @@ use if_chain::if_chain;
6
6
use rustc_errors:: Applicability ;
7
7
8
8
declare_clippy_lint ! {
9
+ /// **What it does:** Checking for imports with single component use path.
10
+ ///
11
+ /// **Why is this bad?** Import with single component use path such as `use cratename;`
12
+ /// is not necessary in order to use the crate.
13
+ ///
14
+ /// **Known problems:** None.
15
+ ///
16
+ /// **Example:**
17
+ ///
18
+ /// ```rust, ignore
19
+ /// use bit_vec;
20
+ ///
21
+ /// fn main() {
22
+ /// bit_vec::BitVec::new();
23
+ ///}
24
+ ///```
9
25
pub SINGLE_COMPONENT_USE_PATH ,
10
26
style,
11
- "use with single component path is redundant in 2018 edition "
27
+ "use with single component path is redundant"
12
28
}
13
29
14
30
declare_lint_pass ! ( SingleComponentUsePath => [ SINGLE_COMPONENT_USE_PATH ] ) ;
@@ -24,7 +40,7 @@ impl EarlyLintPass for SingleComponentUsePath {
24
40
cx,
25
41
SINGLE_COMPONENT_USE_PATH ,
26
42
item. span,
27
- "this import is redundant in 2018 edition " ,
43
+ "this import is redundant" ,
28
44
"remove it entirely" ,
29
45
"" . to_string( ) ,
30
46
Applicability :: MachineApplicable
You can’t perform that action at this time.
0 commit comments