Skip to content

Commit 677ccca

Browse files
Don't pass lint back out of lint decorator
1 parent f90e8ef commit 677ccca

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

clippy_utils/src/diagnostics.rs

-6
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ pub fn span_lint<T: LintContext>(cx: &T, lint: &'static Lint, sp: impl Into<Mult
4949
#[expect(clippy::disallowed_methods)]
5050
cx.struct_span_lint(lint, sp, msg.to_string(), |diag| {
5151
docs_link(diag, lint);
52-
diag
5352
});
5453
}
5554

@@ -90,7 +89,6 @@ pub fn span_lint_and_help<T: LintContext>(
9089
diag.help(help.to_string());
9190
}
9291
docs_link(diag, lint);
93-
diag
9492
});
9593
}
9694

@@ -134,7 +132,6 @@ pub fn span_lint_and_note<T: LintContext>(
134132
diag.note(note);
135133
}
136134
docs_link(diag, lint);
137-
diag
138135
});
139136
}
140137

@@ -152,15 +149,13 @@ where
152149
cx.struct_span_lint(lint, sp, msg.to_string(), |diag| {
153150
f(diag);
154151
docs_link(diag, lint);
155-
diag
156152
});
157153
}
158154

159155
pub fn span_lint_hir(cx: &LateContext<'_>, lint: &'static Lint, hir_id: HirId, sp: Span, msg: &str) {
160156
#[expect(clippy::disallowed_methods)]
161157
cx.tcx.struct_span_lint_hir(lint, hir_id, sp, msg.to_string(), |diag| {
162158
docs_link(diag, lint);
163-
diag
164159
});
165160
}
166161

@@ -176,7 +171,6 @@ pub fn span_lint_hir_and_then(
176171
cx.tcx.struct_span_lint_hir(lint, hir_id, sp, msg.to_string(), |diag| {
177172
f(diag);
178173
docs_link(diag, lint);
179-
diag
180174
});
181175
}
182176

0 commit comments

Comments
 (0)