]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/replace_consts.rs
Auto merge of #4551 - mikerite:fix-ice-reporting, r=llogiq
[rust.git] / clippy_lints / src / replace_consts.rs
index c15eca15c1bb317f321dc3337c1d72f40c0b841e..0dbc7f0551780576e7e66751de10999dbdde9c0c 100644 (file)
     ///
     /// **Example:**
     /// ```rust
+    /// # use core::sync::atomic::{ATOMIC_ISIZE_INIT, AtomicIsize};
     /// static FOO: AtomicIsize = ATOMIC_ISIZE_INIT;
     /// ```
     ///
     /// Could be written:
     ///
     /// ```rust
+    /// # use core::sync::atomic::AtomicIsize;
     /// static FOO: AtomicIsize = AtomicIsize::new(0);
     /// ```
     pub REPLACE_CONSTS,
@@ -56,9 +58,7 @@ fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr) {
     }
 }
 
-const REPLACEMENTS: [([&str; 3], &str); 25] = [
-    // Once
-    (["core", "sync", "ONCE_INIT"], "Once::new()"),
+const REPLACEMENTS: [([&str; 3], &str); 24] = [
     // Min
     (["core", "isize", "MIN"], "isize::min_value()"),
     (["core", "i8", "MIN"], "i8::min_value()"),