diff options
| author | Philipp Krones <hello@philkrones.com> | 2021-07-28 15:06:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-28 15:06:27 +0200 |
| commit | 464c85c8c1c71feda6e53eb9d8713bfdafaf7d8b (patch) | |
| tree | e58ac96a0819f774260a28ea7c1dcdcca567bee2 /clippy_lints/src/reference.rs | |
| parent | bcdf147aafc6d1c365487abd88cb0bc1cf5f2e63 (diff) | |
| parent | 9bc5803195f75895614feae27607564da01d100a (diff) | |
| download | rust-464c85c8c1c71feda6e53eb9d8713bfdafaf7d8b.tar.gz rust-464c85c8c1c71feda6e53eb9d8713bfdafaf7d8b.zip | |
Rollup merge of #7420 - xFrednet:7172-update-lint-documentation, r=flip1995
Update lint documentation to use markdown headlines This PR updates all lint documentation to use markdown headlines. It additionally removed the *Known problems* section for lints without any problems. I've double-checked all automatic replacements, but a second pair of eyes is definitely appreciated! I wasn't sure when you wanted to switch to the new metadata collection tomorrow, I therefore prepared this PR today. And that's it this is a standalone PR to keep the other related PRs reviewable. changelog: none r? `@flip1995` cc: #7172 Note: This should be merged with the other metadata collection related PRs.
Diffstat (limited to 'clippy_lints/src/reference.rs')
| -rw-r--r-- | clippy_lints/src/reference.rs | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/clippy_lints/src/reference.rs b/clippy_lints/src/reference.rs index d6336389b0a..e0930d69ab9 100644 --- a/clippy_lints/src/reference.rs +++ b/clippy_lints/src/reference.rs @@ -10,15 +10,18 @@ use rustc_session::{declare_lint_pass, declare_tool_lint}; use rustc_span::BytePos; declare_clippy_lint! { - /// **What it does:** Checks for usage of `*&` and `*&mut` in expressions. + /// ### What it does + /// Checks for usage of `*&` and `*&mut` in expressions. /// - /// **Why is this bad?** Immediately dereferencing a reference is no-op and + /// ### Why is this bad? + /// Immediately dereferencing a reference is no-op and /// makes the code less clear. /// - /// **Known problems:** Multiple dereference/addrof pairs are not handled so + /// ### Known problems + /// Multiple dereference/addrof pairs are not handled so /// the suggested fix for `x = **&&y` is `x = *&y`, which is still incorrect. /// - /// **Example:** + /// ### Example /// ```rust,ignore /// // Bad /// let a = f(*&mut b); @@ -101,13 +104,15 @@ impl EarlyLintPass for DerefAddrOf { } declare_clippy_lint! { - /// **What it does:** Checks for references in expressions that use + /// ### What it does + /// Checks for references in expressions that use /// auto dereference. /// - /// **Why is this bad?** The reference is a no-op and is automatically + /// ### Why is this bad? + /// The reference is a no-op and is automatically /// dereferenced by the compiler and makes the code less clear. /// - /// **Example:** + /// ### Example /// ```rust /// struct Point(u32, u32); /// let point = Point(30, 20); |
