Fix replace_consts lint documentation

`replace_consts` lint no longer lints for the usage of
`ATOMIC_{SIZE}_INIT` and `ONCE_INIT` so removing any
occurences of them in the documentation.
This commit is contained in:
Krishna Veera Reddy 2019-12-29 09:44:50 -08:00
parent 5b255883f5
commit f533b98121

View File

@ -8,8 +8,8 @@ use rustc_errors::Applicability;
use rustc_session::declare_tool_lint; use rustc_session::declare_tool_lint;
declare_clippy_lint! { declare_clippy_lint! {
/// **What it does:** Checks for usage of `ATOMIC_X_INIT`, `ONCE_INIT`, and /// **What it does:** Checks for usage of standard library
/// `uX/iX::MIN/MAX`. /// `const`s that could be replaced by `const fn`s.
/// ///
/// **Why is this bad?** `const fn`s exist /// **Why is this bad?** `const fn`s exist
/// ///
@ -17,15 +17,15 @@ declare_clippy_lint! {
/// ///
/// **Example:** /// **Example:**
/// ```rust /// ```rust
/// # use core::sync::atomic::{ATOMIC_ISIZE_INIT, AtomicIsize}; /// let x = std::u32::MIN;
/// static FOO: AtomicIsize = ATOMIC_ISIZE_INIT; /// let y = std::u32::MAX;
/// ``` /// ```
/// ///
/// Could be written: /// Could be written:
/// ///
/// ```rust /// ```rust
/// # use core::sync::atomic::AtomicIsize; /// let x = u32::min_value();
/// static FOO: AtomicIsize = AtomicIsize::new(0); /// let y = u32::max_value();
/// ``` /// ```
pub REPLACE_CONSTS, pub REPLACE_CONSTS,
pedantic, pedantic,