use rustc_span::Span;
declare_clippy_lint! {
- /// **What it does:** Checks for literal calls to `Default::default()`.
+ /// ### What it does
+ /// Checks for literal calls to `Default::default()`.
///
- /// **Why is this bad?** It's more clear to the reader to use the name of the type whose default is
+ /// ### Why is this bad?
+ /// It's more clear to the reader to use the name of the type whose default is
/// being gotten than the generic `Default`.
///
- /// **Known problems:** None.
- ///
- /// **Example:**
+ /// ### Example
/// ```rust
/// // Bad
/// let s: String = Default::default();
}
declare_clippy_lint! {
- /// **What it does:** Checks for immediate reassignment of fields initialized
+ /// ### What it does
+ /// Checks for immediate reassignment of fields initialized
/// with Default::default().
///
- /// **Why is this bad?**It's more idiomatic to use the [functional update syntax](https://doc.rust-lang.org/reference/expressions/struct-expr.html#functional-update-syntax).
+ /// ### Why is this bad?
+ ///It's more idiomatic to use the [functional update syntax](https://doc.rust-lang.org/reference/expressions/struct-expr.html#functional-update-syntax).
///
- /// **Known problems:** Assignments to patterns that are of tuple type are not linted.
+ /// ### Known problems
+ /// Assignments to patterns that are of tuple type are not linted.
///
- /// **Example:**
+ /// ### Example
/// Bad:
/// ```
/// # #[derive(Default)]