File tree 1 file changed +6
-6
lines changed
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;
8
8
use rustc_session:: declare_tool_lint;
9
9
10
10
declare_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 .
13
13
///
14
14
/// **Why is this bad?** `const fn`s exist
15
15
///
16
16
/// **Known problems:** None.
17
17
///
18
18
/// **Example:**
19
19
/// ```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 ;
22
22
/// ```
23
23
///
24
24
/// Could be written:
25
25
///
26
26
/// ```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( );
29
29
/// ```
30
30
pub REPLACE_CONSTS ,
31
31
pedantic,
You can’t perform that action at this time.
0 commit comments