]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/wildcard_imports.rs
Rollup merge of #73418 - doctorn:variants-intrinsic, r=kennytm
[rust.git] / src / tools / clippy / clippy_lints / src / wildcard_imports.rs
index 32d9a45c37d78fea94190d3273cbf3844cab6b73..79f7705e281e542806d081fdae55c5e6549220e0 100644 (file)
     /// still around.
     ///
     /// **Example:**
-    /// ```rust
+    /// ```rust,ignore
+    /// // Bad
     /// use std::cmp::Ordering::*;
+    /// foo(Less);
+    ///
+    /// // Good
+    /// use std::cmp::Ordering;
+    /// foo(Ordering::Less)
     /// ```
     pub ENUM_GLOB_USE,
     pedantic,
@@ -30,7 +36,7 @@
 declare_clippy_lint! {
     /// **What it does:** Checks for wildcard imports `use _::*`.
     ///
-    /// **Why is this bad?** wildcard imports can polute the namespace. This is especially bad if
+    /// **Why is this bad?** wildcard imports can pollute the namespace. This is especially bad if
     /// you try to import something through a wildcard, that already has been imported by name from
     /// a different source:
     ///
     ///
     /// **Example:**
     ///
-    /// Bad:
     /// ```rust,ignore
+    /// // Bad
     /// use crate1::*;
     ///
     /// foo();
     /// ```
     ///
-    /// Good:
     /// ```rust,ignore
+    /// // Good
     /// use crate1::foo;
     ///
     /// foo();