X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftools%2Fclippy%2Fclippy_lints%2Fsrc%2Fenum_variants.rs;h=32b95745b64d1092a3032bbc44c6848518ac93e3;hb=fb27c4cc70bc4b1f01847ca95933849152b4df80;hp=b1a105a51c106974b39710be3b241142cd30991f;hpb=88ba8ad730a124f7e1d4f1bd17f2b14cb18eed3c;p=rust.git diff --git a/src/tools/clippy/clippy_lints/src/enum_variants.rs b/src/tools/clippy/clippy_lints/src/enum_variants.rs index b1a105a51c1..32b95745b64 100644 --- a/src/tools/clippy/clippy_lints/src/enum_variants.rs +++ b/src/tools/clippy/clippy_lints/src/enum_variants.rs @@ -10,15 +10,15 @@ use rustc_span::symbol::Symbol; declare_clippy_lint! { - /// **What it does:** Detects enumeration variants that are prefixed or suffixed + /// ### What it does + /// Detects enumeration variants that are prefixed or suffixed /// by the same characters. /// - /// **Why is this bad?** Enumeration variant names should specify their variant, + /// ### Why is this bad? + /// Enumeration variant names should specify their variant, /// not repeat the enumeration name. /// - /// **Known problems:** None. - /// - /// **Example:** + /// ### Example /// ```rust /// enum Cake { /// BlackForestCake, @@ -40,14 +40,14 @@ } declare_clippy_lint! { - /// **What it does:** Detects type names that are prefixed or suffixed by the + /// ### What it does + /// Detects type names that are prefixed or suffixed by the /// containing module's name. /// - /// **Why is this bad?** It requires the user to type the module name twice. - /// - /// **Known problems:** None. + /// ### Why is this bad? + /// It requires the user to type the module name twice. /// - /// **Example:** + /// ### Example /// ```rust /// mod cake { /// struct BlackForestCake; @@ -65,10 +65,12 @@ } declare_clippy_lint! { - /// **What it does:** Checks for modules that have the same name as their + /// ### What it does + /// Checks for modules that have the same name as their /// parent module /// - /// **Why is this bad?** A typical beginner mistake is to have `mod foo;` and + /// ### Why is this bad? + /// A typical beginner mistake is to have `mod foo;` and /// again `mod foo { .. /// }` in `foo.rs`. /// The expectation is that items inside the inner `mod foo { .. }` are then @@ -78,9 +80,7 @@ /// If this is done on purpose, it would be better to choose a more /// representative module name. /// - /// **Known problems:** None. - /// - /// **Example:** + /// ### Example /// ```ignore /// // lib.rs /// mod foo;