about summary refs log tree commit diff
path: root/clippy_lints/src/reference.rs
diff options
context:
space:
mode:
authorThibsG <Thibs@debian.com>2020-05-31 11:38:48 +0200
committerThibsG <Thibs@debian.com>2020-06-01 10:39:52 +0200
commit19339334cb4e9c6db5a1f7dced38edcb16707bc7 (patch)
tree1099fa87df6963f6033c37a446236644d1331e44 /clippy_lints/src/reference.rs
parent262c9dc025042646610df879dd9708eea625534d (diff)
downloadrust-19339334cb4e9c6db5a1f7dced38edcb16707bc7.tar.gz
rust-19339334cb4e9c6db5a1f7dced38edcb16707bc7.zip
Give more corrected code examples in doc
Diffstat (limited to 'clippy_lints/src/reference.rs')
-rw-r--r--clippy_lints/src/reference.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/clippy_lints/src/reference.rs b/clippy_lints/src/reference.rs
index d5797468e9d..fe457aad50e 100644
--- a/clippy_lints/src/reference.rs
+++ b/clippy_lints/src/reference.rs
@@ -16,8 +16,13 @@ declare_clippy_lint! {
     ///
     /// **Example:**
     /// ```rust,ignore
+    /// // Bad
     /// let a = f(*&mut b);
     /// let c = *&d;
+    ///
+    /// // Good
+    /// let a = f(b);
+    /// let c = d;
     /// ```
     pub DEREF_ADDROF,
     complexity,