88//! Thank you!
99//! ~The `INTERNAL_METADATA_COLLECTOR` lint
1010
11- use rustc_errors:: { Applicability , DiagnosticBuilder } ;
11+ use rustc_errors:: { Applicability , Diagnostic } ;
1212use rustc_hir:: HirId ;
1313use rustc_lint:: { LateContext , Lint , LintContext } ;
1414use rustc_span:: source_map:: { MultiSpan , Span } ;
1515use std:: env;
1616
17- fn docs_link ( diag : & mut DiagnosticBuilder < ' _ > , lint : & ' static Lint ) {
17+ fn docs_link ( diag : & mut Diagnostic , lint : & ' static Lint ) {
1818 if env:: var ( "CLIPPY_DISABLE_DOCS_LINKS" ) . is_err ( ) {
1919 if let Some ( lint) = lint. name_lower ( ) . strip_prefix ( "clippy::" ) {
2020 diag. help ( & format ! (
@@ -145,7 +145,7 @@ pub fn span_lint_and_then<C, S, F>(cx: &C, lint: &'static Lint, sp: S, msg: &str
145145where
146146 C : LintContext ,
147147 S : Into < MultiSpan > ,
148- F : FnOnce ( & mut DiagnosticBuilder < ' _ > ) ,
148+ F : FnOnce ( & mut Diagnostic ) ,
149149{
150150 cx. struct_span_lint ( lint, sp, |diag| {
151151 let mut diag = diag. build ( msg) ;
@@ -169,7 +169,7 @@ pub fn span_lint_hir_and_then(
169169 hir_id : HirId ,
170170 sp : impl Into < MultiSpan > ,
171171 msg : & str ,
172- f : impl FnOnce ( & mut DiagnosticBuilder < ' _ > ) ,
172+ f : impl FnOnce ( & mut Diagnostic ) ,
173173) {
174174 cx. tcx . struct_span_lint_hir ( lint, hir_id, sp, |diag| {
175175 let mut diag = diag. build ( msg) ;
@@ -219,7 +219,7 @@ pub fn span_lint_and_sugg<'a, T: LintContext>(
219219/// appear once per
220220/// replacement. In human-readable format though, it only appears once before
221221/// the whole suggestion.
222- pub fn multispan_sugg < I > ( diag : & mut DiagnosticBuilder < ' _ > , help_msg : & str , sugg : I )
222+ pub fn multispan_sugg < I > ( diag : & mut Diagnostic , help_msg : & str , sugg : I )
223223where
224224 I : IntoIterator < Item = ( Span , String ) > ,
225225{
@@ -232,7 +232,7 @@ where
232232/// multiple spans. This is tracked in issue [rustfix#141](https://github.com/rust-lang/rustfix/issues/141).
233233/// Suggestions with multiple spans will be silently ignored.
234234pub fn multispan_sugg_with_applicability < I > (
235- diag : & mut DiagnosticBuilder < ' _ > ,
235+ diag : & mut Diagnostic ,
236236 help_msg : & str ,
237237 applicability : Applicability ,
238238 sugg : I ,
0 commit comments