diff options
| author | Yuri Astrakhan <YuriAstrakhan@gmail.com> | 2023-03-28 20:52:55 -0400 |
|---|---|---|
| committer | Yuri Astrakhan <YuriAstrakhan@gmail.com> | 2023-03-28 21:08:06 -0400 |
| commit | 783879e6fe48b5bd776bf2b1c9314fda3e30447d (patch) | |
| tree | 831db9b3683ddf871bf58cd52bc2a3e6f1f2dcac /clippy_dev/src | |
| parent | 58fb8014146c22bfdf60f47c864537abc7b78486 (diff) | |
| download | rust-783879e6fe48b5bd776bf2b1c9314fda3e30447d.tar.gz rust-783879e6fe48b5bd776bf2b1c9314fda3e30447d.zip | |
Partial no-op refactoring of #9948
This contains preparatory work for #9948 to keep that change to the minimum, and make it easier to review it.
Diffstat (limited to 'clippy_dev/src')
| -rw-r--r-- | clippy_dev/src/new_lint.rs | 8 | ||||
| -rw-r--r-- | clippy_dev/src/update_lints.rs | 14 |
2 files changed, 7 insertions, 15 deletions
diff --git a/clippy_dev/src/new_lint.rs b/clippy_dev/src/new_lint.rs index 420214d9256..13a27703427 100644 --- a/clippy_dev/src/new_lint.rs +++ b/clippy_dev/src/new_lint.rs @@ -369,9 +369,7 @@ fn create_lint_for_ty(lint: &LintData<'_>, enable_msrv: bool, ty: &str) -> io::R }} todo!(); }} - "#, - context_import = context_import, - name_upper = name_upper, + "# ); } else { let _: fmt::Result = writedoc!( @@ -385,9 +383,7 @@ fn create_lint_for_ty(lint: &LintData<'_>, enable_msrv: bool, ty: &str) -> io::R pub(super) fn check(cx: &{context_import}) {{ todo!(); }} - "#, - context_import = context_import, - name_upper = name_upper, + "# ); } diff --git a/clippy_dev/src/update_lints.rs b/clippy_dev/src/update_lints.rs index 779e4d0e1e3..95222a9acdf 100644 --- a/clippy_dev/src/update_lints.rs +++ b/clippy_dev/src/update_lints.rs @@ -537,17 +537,13 @@ fn declare_deprecated(name: &str, path: &Path, reason: &str) -> io::Result<()> { /// Nothing. This lint has been deprecated. /// /// ### Deprecation reason - /// {} - #[clippy::version = \"{}\"] - pub {}, - \"{}\" + /// {deprecation_reason} + #[clippy::version = \"{version}\"] + pub {name}, + \"{reason}\" }} - ", - deprecation_reason, - version, - name, - reason, + " ) } |
