Skip to content

Commit 94d6be4

Browse files
committed
Auto merge of #7458 - flip1995:unused_unit-doc, r=giraffate
Add fixed example to unused_unit documentation changelog: none (don't think this is worth a changelog mention)
2 parents cb16543 + f05949f commit 94d6be4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clippy_lints/src/unused_unit.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ declare_clippy_lint! {
2424
/// ()
2525
/// }
2626
/// ```
27+
/// is equivalent to
28+
/// ```rust
29+
/// fn return_unit() {}
30+
/// ```
2731
pub UNUSED_UNIT,
2832
style,
2933
"needless unit expression"

0 commit comments

Comments
 (0)