diff options
| author | Philipp Krones <hello@philkrones.com> | 2024-05-30 10:49:05 +0200 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2024-05-30 10:49:05 +0200 |
| commit | f67f72695a2ac5e7a1d39383583a6abb1cf9f4ad (patch) | |
| tree | 440fed96c1582328fc3114474755757664998ae8 /clippy_dev | |
| parent | d38920f67752c270dcdbf7444f668c019864f12f (diff) | |
| download | rust-f67f72695a2ac5e7a1d39383583a6abb1cf9f4ad.tar.gz rust-f67f72695a2ac5e7a1d39383583a6abb1cf9f4ad.zip | |
Merge commit 'c9139bd546d9cd69df817faeab62c5f9b1a51337' into clippy-subtree-update
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 |
