diff options
| author | flip1995 <philipp.krones@embecosm.com> | 2021-07-13 10:54:29 +0200 |
|---|---|---|
| committer | flip1995 <philipp.krones@embecosm.com> | 2021-07-13 10:54:29 +0200 |
| commit | f05949f9ce0d25f3b993a0a668909956818c0464 (patch) | |
| tree | e1ad84f8e02e84ab971cf55b0daba253b66aac33 | |
| parent | cb16543b3a3ee3769dc07ca191e15988758ced0e (diff) | |
| download | rust-f05949f9ce0d25f3b993a0a668909956818c0464.tar.gz rust-f05949f9ce0d25f3b993a0a668909956818c0464.zip | |
Add fixed example to unused_unit documentation
| -rw-r--r-- | clippy_lints/src/unused_unit.rs | 4 |
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" |
