]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/implicit_return.rs
Rollup merge of #85534 - csmoe:demagnle-assert, r=michaelwoerister
[rust.git] / src / tools / clippy / clippy_lints / src / implicit_return.rs
index f2f830ca5c09e51a6dec78fd166f515801d8c377..fa7b5302cb13135a9e30986c40ff3b6205bfe27a 100644 (file)
 use rustc_span::{Span, SyntaxContext};
 
 declare_clippy_lint! {
-    /// **What it does:** Checks for missing return statements at the end of a block.
+    /// ### What it does
+    /// Checks for missing return statements at the end of a block.
     ///
-    /// **Why is this bad?** Actually omitting the return keyword is idiomatic Rust code. Programmers
+    /// ### Why is this bad?
+    /// Actually omitting the return keyword is idiomatic Rust code. Programmers
     /// coming from other languages might prefer the expressiveness of `return`. It's possible to miss
     /// the last returning statement because the only difference is a missing `;`. Especially in bigger
     /// code with multiple return paths having a `return` keyword makes it easier to find the
     /// corresponding statements.
     ///
-    /// **Known problems:** None.
-    ///
-    /// **Example:**
+    /// ### Example
     /// ```rust
     /// fn foo(x: usize) -> usize {
     ///     x