File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -8,24 +8,24 @@ use rustc_errors::Applicability;
88use rustc_session:: declare_tool_lint;
99
1010declare_clippy_lint ! {
11- /// **What it does:** Checks for usage of `ATOMIC_X_INIT`, `ONCE_INIT`, and
12- /// `uX/iX::MIN/MAX` .
11+ /// **What it does:** Checks for usage of standard library
12+ /// `const`s that could be replaced by `const fn`s .
1313 ///
1414 /// **Why is this bad?** `const fn`s exist
1515 ///
1616 /// **Known problems:** None.
1717 ///
1818 /// **Example:**
1919 /// ```rust
20- /// # use core::sync::atomic::{ATOMIC_ISIZE_INIT, AtomicIsize} ;
21- /// static FOO: AtomicIsize = ATOMIC_ISIZE_INIT ;
20+ /// let x = std::u32::MIN ;
21+ /// let y = std::u32::MAX ;
2222 /// ```
2323 ///
2424 /// Could be written:
2525 ///
2626 /// ```rust
27- /// # use core::sync::atomic::AtomicIsize ;
28- /// static FOO: AtomicIsize = AtomicIsize::new(0 );
27+ /// let x = u32::min_value() ;
28+ /// let y = u32::max_value( );
2929 /// ```
3030 pub REPLACE_CONSTS ,
3131 pedantic,
You can’t perform that action at this time.
0 commit comments