about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--clippy_lints/src/let_underscore.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/clippy_lints/src/let_underscore.rs b/clippy_lints/src/let_underscore.rs
index e8e64bca535..fb2df9369dc 100644
--- a/clippy_lints/src/let_underscore.rs
+++ b/clippy_lints/src/let_underscore.rs
@@ -79,12 +79,20 @@ declare_clippy_lint! {
     /// impl Drop for Droppable {
     ///     fn drop(&mut self) {}
     /// }
-    /// let _ = Droppable;
+    /// {
+    ///     let _ = Droppable;
+    ///     //               ^ dropped here
+    ///     /* more code */
+    /// }
     /// ```
     ///
     /// Good:
     /// ```rust,ignore
-    /// let _droppable = Droppable;
+    /// {
+    ///     let _droppable = Droppable;
+    ///     /* more code */
+    ///     // dropped at end of scope
+    /// }
     /// ```
     pub LET_UNDERSCORE_DROP,
     correctness,