Skip to content

Commit 9751cba

Browse files
smoeliusflip1995
andauthored
Update clippy_lints/src/let_underscore.rs
Co-authored-by: Philipp Krones <hello@philkrones.com>
1 parent aa6bf1f commit 9751cba

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

clippy_lints/src/let_underscore.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,20 @@ declare_clippy_lint! {
7979
/// impl Drop for Droppable {
8080
/// fn drop(&mut self) {}
8181
/// }
82-
/// let _ = Droppable;
82+
/// {
83+
/// let _ = Droppable;
84+
/// // ^ dropped here
85+
/// /* more code */
86+
/// }
8387
/// ```
8488
///
8589
/// Good:
8690
/// ```rust,ignore
87-
/// let _droppable = Droppable;
91+
/// {
92+
/// let _droppable = Droppable;
93+
/// /* more code */
94+
/// // dropped at end of scope
95+
/// }
8896
/// ```
8997
pub LET_UNDERSCORE_DROP,
9098
correctness,

0 commit comments

Comments
 (0)