about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/clippy.yml7
-rw-r--r--clippy_dev/src/new_lint.rs2
2 files changed, 8 insertions, 1 deletions
diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml
index 5fa8009a8b4..99e371631b1 100644
--- a/.github/workflows/clippy.yml
+++ b/.github/workflows/clippy.yml
@@ -92,6 +92,13 @@ jobs:
       env:
         OS: ${{ runner.os }}
 
+    - name: Test cargo dev new lint
+      run: |
+        cargo dev new_lint --name new_early_pass --pass early
+        cargo dev new_lint --name new_late_pass --pass late
+        cargo check
+        git reset --hard HEAD
+
     # Cleanup
     - name: Run cargo-cache --autoclean
       run: |
diff --git a/clippy_dev/src/new_lint.rs b/clippy_dev/src/new_lint.rs
index 1e032a7bc20..d951ca0e630 100644
--- a/clippy_dev/src/new_lint.rs
+++ b/clippy_dev/src/new_lint.rs
@@ -47,7 +47,7 @@ pub fn create(pass: Option<&str>, lint_name: Option<&str>, category: Option<&str
 fn create_lint(lint: &LintData) -> io::Result<()> {
     let (pass_type, pass_lifetimes, pass_import, context_import) = match lint.pass {
         "early" => ("EarlyLintPass", "", "use rustc_ast::ast::*;", "EarlyContext"),
-        "late" => ("LateLintPass", "<'_, '_>", "use rustc_hir::*;", "LateContext"),
+        "late" => ("LateLintPass", "<'_>", "use rustc_hir::*;", "LateContext"),
         _ => {
             unreachable!("`pass_type` should only ever be `early` or `late`!");
         },