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! {
1111 /// scope.
1212 ///
1313 /// ### Example
14- /// ```rust
14+ /// ```
1515 /// struct SomeStruct;
1616 /// impl Drop for SomeStruct {
1717 /// fn drop(&mut self) {
@@ -20,6 +20,7 @@ declare_lint! {
2020 /// }
2121 ///
2222 /// fn main() {
23+ /// #[warn(let_underscore_drop)]
2324 /// // SomeStuct is dropped immediately instead of at end of scope,
2425 /// // so "Dropping SomeStruct" is printed before "end of main".
2526 /// // The order of prints would be reversed if SomeStruct was bound to
@@ -28,6 +29,9 @@ declare_lint! {
2829 /// println!("end of main");
2930 /// }
3031 /// ```
32+ ///
33+ /// {{produces}}
34+ ///
3135 /// ### Explanation
3236 ///
3337 /// Statements which assign an expression to an underscore causes the
@@ -66,6 +70,9 @@ declare_lint! {
6670 /// *lock += 1;
6771 /// });
6872 /// ```
73+ ///
74+ /// {{produces}}
75+ ///
6976 /// ### Explanation
7077 ///
7178 /// Statements which assign an expression to an underscore causes the
You can’t perform that action at this time.
0 commit comments