From 9751cba2c675c2cd46742d2a81c891d4db4deacc Mon Sep 17 00:00:00 2001 From: "Samuel E. Moelius" <35515885+smoelius@users.noreply.github.com> Date: Sun, 8 Nov 2020 17:25:23 -0500 Subject: [PATCH] Update clippy_lints/src/let_underscore.rs Co-authored-by: Philipp Krones --- clippy_lints/src/let_underscore.rs | 12 ++++++++++-- 1 file 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,