@@ -46,6 +46,7 @@ fn docs_link(diag: &mut Diagnostic, lint: &'static Lint) {
46
46
/// | ^^^^^^^^^^^^^^^^^^^^^^^
47
47
/// ```
48
48
pub fn span_lint < T : LintContext > ( cx : & T , lint : & ' static Lint , sp : impl Into < MultiSpan > , msg : & str ) {
49
+ #[ expect( clippy:: disallowed_methods) ]
49
50
cx. struct_span_lint ( lint, sp, msg. to_string ( ) , |diag| {
50
51
docs_link ( diag, lint) ;
51
52
diag
@@ -80,6 +81,7 @@ pub fn span_lint_and_help<T: LintContext>(
80
81
help_span : Option < Span > ,
81
82
help : & str ,
82
83
) {
84
+ #[ expect( clippy:: disallowed_methods) ]
83
85
cx. struct_span_lint ( lint, span, msg. to_string ( ) , |diag| {
84
86
let help = help. to_string ( ) ;
85
87
if let Some ( help_span) = help_span {
@@ -123,6 +125,7 @@ pub fn span_lint_and_note<T: LintContext>(
123
125
note_span : Option < Span > ,
124
126
note : & str ,
125
127
) {
128
+ #[ expect( clippy:: disallowed_methods) ]
126
129
cx. struct_span_lint ( lint, span, msg. to_string ( ) , |diag| {
127
130
let note = note. to_string ( ) ;
128
131
if let Some ( note_span) = note_span {
@@ -145,6 +148,7 @@ where
145
148
S : Into < MultiSpan > ,
146
149
F : FnOnce ( & mut Diagnostic ) ,
147
150
{
151
+ #[ expect( clippy:: disallowed_methods) ]
148
152
cx. struct_span_lint ( lint, sp, msg. to_string ( ) , |diag| {
149
153
f ( diag) ;
150
154
docs_link ( diag, lint) ;
@@ -153,6 +157,7 @@ where
153
157
}
154
158
155
159
pub fn span_lint_hir ( cx : & LateContext < ' _ > , lint : & ' static Lint , hir_id : HirId , sp : Span , msg : & str ) {
160
+ #[ expect( clippy:: disallowed_methods) ]
156
161
cx. tcx . struct_span_lint_hir ( lint, hir_id, sp, msg. to_string ( ) , |diag| {
157
162
docs_link ( diag, lint) ;
158
163
diag
@@ -167,6 +172,7 @@ pub fn span_lint_hir_and_then(
167
172
msg : & str ,
168
173
f : impl FnOnce ( & mut Diagnostic ) ,
169
174
) {
175
+ #[ expect( clippy:: disallowed_methods) ]
170
176
cx. tcx . struct_span_lint_hir ( lint, hir_id, sp, msg. to_string ( ) , |diag| {
171
177
f ( diag) ;
172
178
docs_link ( diag, lint) ;
0 commit comments