diff options
| author | Philipp Krones <hello@philkrones.com> | 2024-05-30 09:44:14 +0200 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2024-05-30 09:44:14 +0200 |
| commit | 89037ea18f101e2e586feb81d2595a47ae42da46 (patch) | |
| tree | e5934c662d0ace18bdc16cccb6c2342f69f3e5d7 /clippy_dev | |
| parent | bda742762157d33dc2b2b52c451bcbf4d5237f08 (diff) | |
| parent | da4b2127c0a144699b946eec3c8c9d4fd7050c17 (diff) | |
| download | rust-89037ea18f101e2e586feb81d2595a47ae42da46.tar.gz rust-89037ea18f101e2e586feb81d2595a47ae42da46.zip | |
Merge remote-tracking branch 'upstream/master' into rustup
Diffstat (limited to 'clippy_dev')
| -rw-r--r-- | clippy_dev/src/new_lint.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clippy_dev/src/new_lint.rs b/clippy_dev/src/new_lint.rs index b6481dde4dd..2e56eb8ec15 100644 --- a/clippy_dev/src/new_lint.rs +++ b/clippy_dev/src/new_lint.rs @@ -331,12 +331,17 @@ fn get_lint_file_contents(lint: &LintData<'_>, enable_msrv: bool) -> String { } fn get_lint_declaration(name_upper: &str, category: &str) -> String { + let justification_heading = if category == "restriction" { + "Why restrict this?" + } else { + "Why is this bad?" + }; formatdoc!( r#" declare_clippy_lint! {{ /// ### What it does /// - /// ### Why is this bad? + /// ### {justification_heading} /// /// ### Example /// ```no_run |
