8
8
//! Thank you!
9
9
//! ~The `INTERNAL_METADATA_COLLECTOR` lint
10
10
11
- use rustc_errors:: { Applicability , DiagnosticBuilder , MultiSpan } ;
11
+ use rustc_errors:: { Applicability , Diag , MultiSpan } ;
12
12
use rustc_hir:: HirId ;
13
13
use rustc_lint:: { LateContext , Lint , LintContext } ;
14
14
use rustc_span:: Span ;
15
15
use std:: env;
16
16
17
- fn docs_link ( diag : & mut DiagnosticBuilder < ' _ , ( ) > , lint : & ' static Lint ) {
17
+ fn docs_link ( diag : & mut Diag < ' _ , ( ) > , lint : & ' static Lint ) {
18
18
if env:: var ( "CLIPPY_DISABLE_DOCS_LINKS" ) . is_err ( ) {
19
19
if let Some ( lint) = lint. name_lower ( ) . strip_prefix ( "clippy::" ) {
20
20
diag. help ( format ! (
@@ -143,7 +143,7 @@ pub fn span_lint_and_then<C, S, F>(cx: &C, lint: &'static Lint, sp: S, msg: &str
143
143
where
144
144
C : LintContext ,
145
145
S : Into < MultiSpan > ,
146
- F : FnOnce ( & mut DiagnosticBuilder < ' _ , ( ) > ) ,
146
+ F : FnOnce ( & mut Diag < ' _ , ( ) > ) ,
147
147
{
148
148
#[ expect( clippy:: disallowed_methods) ]
149
149
cx. span_lint ( lint, sp, msg. to_string ( ) , |diag| {
@@ -165,7 +165,7 @@ pub fn span_lint_hir_and_then(
165
165
hir_id : HirId ,
166
166
sp : impl Into < MultiSpan > ,
167
167
msg : & str ,
168
- f : impl FnOnce ( & mut DiagnosticBuilder < ' _ , ( ) > ) ,
168
+ f : impl FnOnce ( & mut Diag < ' _ , ( ) > ) ,
169
169
) {
170
170
#[ expect( clippy:: disallowed_methods) ]
171
171
cx. tcx . node_span_lint ( lint, hir_id, sp, msg. to_string ( ) , |diag| {
@@ -214,7 +214,7 @@ pub fn span_lint_and_sugg<T: LintContext>(
214
214
/// appear once per
215
215
/// replacement. In human-readable format though, it only appears once before
216
216
/// the whole suggestion.
217
- pub fn multispan_sugg < I > ( diag : & mut DiagnosticBuilder < ' _ , ( ) > , help_msg : & str , sugg : I )
217
+ pub fn multispan_sugg < I > ( diag : & mut Diag < ' _ , ( ) > , help_msg : & str , sugg : I )
218
218
where
219
219
I : IntoIterator < Item = ( Span , String ) > ,
220
220
{
@@ -227,7 +227,7 @@ where
227
227
/// multiple spans. This is tracked in issue [rustfix#141](https://github.com/rust-lang/rustfix/issues/141).
228
228
/// Suggestions with multiple spans will be silently ignored.
229
229
pub fn multispan_sugg_with_applicability < I > (
230
- diag : & mut DiagnosticBuilder < ' _ , ( ) > ,
230
+ diag : & mut Diag < ' _ , ( ) > ,
231
231
help_msg : & str ,
232
232
applicability : Applicability ,
233
233
sugg : I ,
0 commit comments