You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clippy_lints/src/anon_trait_import.rs
+15-14Lines changed: 15 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -10,30 +10,31 @@ use rustc_span::symbol::kw;
10
10
11
11
declare_clippy_lint!{
12
12
/// ### What it does
13
-
/// Checks for `use Trait` where the Trait is not used directly.
13
+
/// Checks for `use Trait` where the Trait is only used for its methods and not referenced by a path directly.
14
14
///
15
15
/// ### Why is this bad?
16
-
/// Traits imported that aren't used directly can be imported anonymously `use Trait as _`. It is more explicit and can be useful to show which imports are required for traits.
16
+
/// Traits imported that aren't used directly can be imported anonymously `use Trait as _`.
17
+
/// It is more explicit, avoids polutting the current scope with unused names and can be useful to show which imports are required for traits.
0 commit comments