@@ -46,6 +46,7 @@ fn docs_link(diag: &mut Diagnostic, lint: &'static Lint) {
4646/// | ^^^^^^^^^^^^^^^^^^^^^^^
4747/// ```
4848pub fn span_lint < T : LintContext > ( cx : & T , lint : & ' static Lint , sp : impl Into < MultiSpan > , msg : & str ) {
49+ #[ expect( clippy:: disallowed_methods) ]
4950 cx. struct_span_lint ( lint, sp, msg. to_string ( ) , |diag| {
5051 docs_link ( diag, lint) ;
5152 diag
@@ -80,6 +81,7 @@ pub fn span_lint_and_help<T: LintContext>(
8081 help_span : Option < Span > ,
8182 help : & str ,
8283) {
84+ #[ expect( clippy:: disallowed_methods) ]
8385 cx. struct_span_lint ( lint, span, msg. to_string ( ) , |diag| {
8486 let help = help. to_string ( ) ;
8587 if let Some ( help_span) = help_span {
@@ -123,6 +125,7 @@ pub fn span_lint_and_note<T: LintContext>(
123125 note_span : Option < Span > ,
124126 note : & str ,
125127) {
128+ #[ expect( clippy:: disallowed_methods) ]
126129 cx. struct_span_lint ( lint, span, msg. to_string ( ) , |diag| {
127130 let note = note. to_string ( ) ;
128131 if let Some ( note_span) = note_span {
@@ -145,6 +148,7 @@ where
145148 S : Into < MultiSpan > ,
146149 F : FnOnce ( & mut Diagnostic ) ,
147150{
151+ #[ expect( clippy:: disallowed_methods) ]
148152 cx. struct_span_lint ( lint, sp, msg. to_string ( ) , |diag| {
149153 f ( diag) ;
150154 docs_link ( diag, lint) ;
@@ -153,6 +157,7 @@ where
153157}
154158
155159pub fn span_lint_hir ( cx : & LateContext < ' _ > , lint : & ' static Lint , hir_id : HirId , sp : Span , msg : & str ) {
160+ #[ expect( clippy:: disallowed_methods) ]
156161 cx. tcx . struct_span_lint_hir ( lint, hir_id, sp, msg. to_string ( ) , |diag| {
157162 docs_link ( diag, lint) ;
158163 diag
@@ -167,6 +172,7 @@ pub fn span_lint_hir_and_then(
167172 msg : & str ,
168173 f : impl FnOnce ( & mut Diagnostic ) ,
169174) {
175+ #[ expect( clippy:: disallowed_methods) ]
170176 cx. tcx . struct_span_lint_hir ( lint, hir_id, sp, msg. to_string ( ) , |diag| {
171177 f ( diag) ;
172178 docs_link ( diag, lint) ;
0 commit comments