]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/zero_div_zero.rs
Auto merge of #9148 - arieluy:then_some_unwrap_or, r=Jarcho
[rust.git] / clippy_lints / src / zero_div_zero.rs
index e0746ce4d8121b115f1da360d5b2e9756aaa3c06..50d3c079fe6758c8ff8ff8dce2adeaed804fd6ac 100644 (file)
     ///
     /// ### Example
     /// ```rust
-    /// // Bad
     /// let nan = 0.0f32 / 0.0;
+    /// ```
     ///
-    /// // Good
+    /// Use instead:
+    /// ```rust
     /// let nan = f32::NAN;
     /// ```
+    #[clippy::version = "pre 1.29.0"]
     pub ZERO_DIVIDED_BY_ZERO,
     complexity,
     "usage of `0.0 / 0.0` to obtain NaN instead of `f32::NAN` or `f64::NAN`"