File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ declare_lint! {
11
11
/// scope.
12
12
///
13
13
/// ### Example
14
- /// ```rust
14
+ /// ```
15
15
/// struct SomeStruct;
16
16
/// impl Drop for SomeStruct {
17
17
/// fn drop(&mut self) {
@@ -20,6 +20,7 @@ declare_lint! {
20
20
/// }
21
21
///
22
22
/// fn main() {
23
+ /// #[warn(let_underscore_drop)]
23
24
/// // SomeStuct is dropped immediately instead of at end of scope,
24
25
/// // so "Dropping SomeStruct" is printed before "end of main".
25
26
/// // The order of prints would be reversed if SomeStruct was bound to
@@ -28,6 +29,9 @@ declare_lint! {
28
29
/// println!("end of main");
29
30
/// }
30
31
/// ```
32
+ ///
33
+ /// {{produces}}
34
+ ///
31
35
/// ### Explanation
32
36
///
33
37
/// Statements which assign an expression to an underscore causes the
@@ -66,6 +70,9 @@ declare_lint! {
66
70
/// *lock += 1;
67
71
/// });
68
72
/// ```
73
+ ///
74
+ /// {{produces}}
75
+ ///
69
76
/// ### Explanation
70
77
///
71
78
/// Statements which assign an expression to an underscore causes the
You can’t perform that action at this time.
0 commit comments