diff --git a/clippy_lints/src/approx_const.rs b/clippy_lints/src/approx_const.rs index fac75cffeba6..9f665a3361da 100644 --- a/clippy_lints/src/approx_const.rs +++ b/clippy_lints/src/approx_const.rs @@ -23,7 +23,13 @@ declare_clippy_lint! { /// /// **Example:** /// ```rust + /// // Bad /// let x = 3.14; + /// let y = 1_f64 / x; + /// + /// // Good + /// let x = std::f32::consts::PI; + /// let y = std::f64::consts::FRAC_1_PI; /// ``` pub APPROX_CONSTANT, correctness,