]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/octal_escapes.rs
Auto merge of #9148 - arieluy:then_some_unwrap_or, r=Jarcho
[rust.git] / clippy_lints / src / octal_escapes.rs
index e8532db4f711dbc658d9862f8ff6b4851253b5c8..6ad6837f0e3507afdb92fdcc0e2fcfbd3d6fe30d 100644 (file)
     /// and friends since the string is already preprocessed when Clippy lints
     /// can see it.
     ///
-    /// # Example
+    /// ### Example
     /// ```rust
-    /// // Bad
     /// let one = "\033[1m Bold? \033[0m";  // \033 intended as escape
     /// let two = "\033\0";                 // \033 intended as null-3-3
+    /// ```
     ///
-    /// // Good
+    /// Use instead:
+    /// ```rust
     /// let one = "\x1b[1mWill this be bold?\x1b[0m";
     /// let two = "\x0033\x00";
     /// ```
-    #[clippy::version = "1.58.0"]
+    #[clippy::version = "1.59.0"]
     pub OCTAL_ESCAPES,
     suspicious,
     "string escape sequences looking like octal characters"