]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/replace_consts.rs
Auto merge of #3946 - rchaser53:issue-3920, r=flip1995
[rust.git] / clippy_lints / src / replace_consts.rs
index 47168445ad3c518941e14fd69c82469e7908f8f5..10e339eeb023cd8cbcb0396103147bedfab8d776 100644 (file)
@@ -6,24 +6,24 @@
 use rustc::{declare_tool_lint, lint_array};
 use rustc_errors::Applicability;
 
-/// **What it does:** Checks for usage of `ATOMIC_X_INIT`, `ONCE_INIT`, and
-/// `uX/iX::MIN/MAX`.
-///
-/// **Why is this bad?** `const fn`s exist
-///
-/// **Known problems:** None.
-///
-/// **Example:**
-/// ```rust
-/// static FOO: AtomicIsize = ATOMIC_ISIZE_INIT;
-/// ```
-///
-/// Could be written:
-///
-/// ```rust
-/// static FOO: AtomicIsize = AtomicIsize::new(0);
-/// ```
 declare_clippy_lint! {
+    /// **What it does:** Checks for usage of `ATOMIC_X_INIT`, `ONCE_INIT`, and
+    /// `uX/iX::MIN/MAX`.
+    ///
+    /// **Why is this bad?** `const fn`s exist
+    ///
+    /// **Known problems:** None.
+    ///
+    /// **Example:**
+    /// ```rust
+    /// static FOO: AtomicIsize = ATOMIC_ISIZE_INIT;
+    /// ```
+    ///
+    /// Could be written:
+    ///
+    /// ```rust
+    /// static FOO: AtomicIsize = AtomicIsize::new(0);
+    /// ```
     pub REPLACE_CONSTS,
     pedantic,
     "Lint usages of standard library `const`s that could be replaced by `const fn`s"