about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStanislav Tkach <stanislav.tkach@gmail.com>2022-08-13 16:04:30 +0200
committerStanislav Tkach <stanislav.tkach@gmail.com>2022-08-15 20:48:40 +0200
commit7727c303e5eaef93dbccc75a0b9004d9c75d3a62 (patch)
treef9e311a5f14c23c3a105a42a19651723bd4b7f9b
parent4d5d191f6af4d4697e9b983b655aa7dd96fd966f (diff)
downloadrust-7727c303e5eaef93dbccc75a0b9004d9c75d3a62.tar.gz
rust-7727c303e5eaef93dbccc75a0b9004d9c75d3a62.zip
Simplify the borrow_deref_ref lint example
-rw-r--r--clippy_lints/src/borrow_deref_ref.rs5
1 files changed, 0 insertions, 5 deletions
diff --git a/clippy_lints/src/borrow_deref_ref.rs b/clippy_lints/src/borrow_deref_ref.rs
index e65b67c655e..c4520d00392 100644
--- a/clippy_lints/src/borrow_deref_ref.rs
+++ b/clippy_lints/src/borrow_deref_ref.rs
@@ -29,20 +29,15 @@ declare_clippy_lint! {
     ///
     /// ### Example
     /// ```rust
-    /// fn foo(_x: &str) {}
-    ///
     /// let s = &String::new();
     ///
     /// let a: &String = &* s;
-    /// foo(&*s);
     /// ```
     ///
     /// Use instead:
     /// ```rust
-    /// # fn foo(_x: &str) {}
     /// # let s = &String::new();
     /// let a: &String = s;
-    /// foo(&**s);
     /// ```
     #[clippy::version = "1.63.0"]
     pub BORROW_DEREF_REF,