about summary refs log tree commit diff
path: root/clippy_dev
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2023-04-11 15:31:08 +0200
committerPhilipp Krones <hello@philkrones.com>2023-04-11 15:31:08 +0200
commit6b95029f176e5cdaa88de8ca7f5f59fd15a6d850 (patch)
treea46baab4cf11050924648f768e9d5e2fd5f3f0bd /clippy_dev
parentfe129a022a0ae1c458b065725a819faabcbdb2b6 (diff)
downloadrust-6b95029f176e5cdaa88de8ca7f5f59fd15a6d850.tar.gz
rust-6b95029f176e5cdaa88de8ca7f5f59fd15a6d850.zip
Merge commit '83e42a2337dadac915c956d125f1d69132f36425' into clippyup
Diffstat (limited to 'clippy_dev')
-rw-r--r--clippy_dev/src/lib.rs1
-rw-r--r--clippy_dev/src/new_lint.rs8
-rw-r--r--clippy_dev/src/update_lints.rs14
3 files changed, 8 insertions, 15 deletions
diff --git a/clippy_dev/src/lib.rs b/clippy_dev/src/lib.rs
index 8871873c661..3a8b070d735 100644
--- a/clippy_dev/src/lib.rs
+++ b/clippy_dev/src/lib.rs
@@ -1,3 +1,4 @@
+#![feature(lazy_cell)]
 #![feature(let_chains)]
 #![feature(rustc_private)]
 #![cfg_attr(feature = "deny-warnings", deny(warnings))]
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,
+        "
     )
 }