Update comment location

This commit is contained in:
Philipp Hansch 2019-03-08 08:50:13 +01:00
parent 3c67c629fd
commit 34685a5f60
No known key found for this signature in database
GPG Key ID: B6FA06A6E0E2665B

View File

@ -339,22 +339,26 @@ lint declaration.
Please document your lint with a doc comment akin to the following:
```rust
/// **What it does:** Checks for ... (describe what the lint matches).
///
/// **Why is this bad?** Supply the reason for linting the code.
///
/// **Known problems:** None. (Or describe where it could go wrong.)
///
/// **Example:**
///
/// ```rust,ignore
/// // Bad
/// Insert a short example of code that triggers the lint
///
/// // Good
/// Insert a short example of improved code that doesn't trigger the lint
/// ```
declare_clippy_lint! { /* ... */ }
declare_clippy_lint! {
/// **What it does:** Checks for ... (describe what the lint matches).
///
/// **Why is this bad?** Supply the reason for linting the code.
///
/// **Known problems:** None. (Or describe where it could go wrong.)
///
/// **Example:**
///
/// ```rust,ignore
/// // Bad
/// Insert a short example of code that triggers the lint
///
/// // Good
/// Insert a short example of improved code that doesn't trigger the lint
/// ```
pub FOO_FUNCTIONS,
pedantic,
"function named `foo`, which is not a descriptive name"
}
```
Once your lint is merged, this documentation will show up in the [lint