about summary refs log tree commit diff
diff options
context:
space:
mode:
authorflip1995 <philipp.krones@embecosm.com>2021-07-13 10:54:29 +0200
committerflip1995 <philipp.krones@embecosm.com>2021-07-13 10:54:29 +0200
commitf05949f9ce0d25f3b993a0a668909956818c0464 (patch)
treee1ad84f8e02e84ab971cf55b0daba253b66aac33
parentcb16543b3a3ee3769dc07ca191e15988758ced0e (diff)
downloadrust-f05949f9ce0d25f3b993a0a668909956818c0464.tar.gz
rust-f05949f9ce0d25f3b993a0a668909956818c0464.zip
Add fixed example to unused_unit documentation
-rw-r--r--clippy_lints/src/unused_unit.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/clippy_lints/src/unused_unit.rs b/clippy_lints/src/unused_unit.rs
index e14945651f5..ab0cdf75ffe 100644
--- a/clippy_lints/src/unused_unit.rs
+++ b/clippy_lints/src/unused_unit.rs
@@ -24,6 +24,10 @@ declare_clippy_lint! {
     ///     ()
     /// }
     /// ```
+    /// is equivalent to
+    /// ```rust
+    /// fn return_unit() {}
+    /// ```
     pub UNUSED_UNIT,
     style,
     "needless unit expression"