File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1
1
use std:: ops:: AddAssign ;
2
2
3
- use clippy_utils:: diagnostics:: span_lint_and_then ;
3
+ use clippy_utils:: diagnostics:: span_lint_and_note ;
4
4
use rustc_hir:: def_id:: LocalDefId ;
5
5
use rustc_hir:: intravisit:: FnKind ;
6
6
use rustc_hir:: Body ;
@@ -146,14 +146,13 @@ impl<'tcx> LateLintPass<'tcx> for LargeStackFrames {
146
146
}
147
147
148
148
if frame_size. exceeds_limit ( self . maximum_allowed_size ) {
149
- span_lint_and_then (
149
+ span_lint_and_note (
150
150
cx,
151
151
LARGE_STACK_FRAMES ,
152
152
span,
153
153
"this function allocates a large amount of stack space" ,
154
- |diag| {
155
- diag. note ( "allocating large amounts of stack space can overflow the stack" ) ;
156
- } ,
154
+ None ,
155
+ "allocating large amounts of stack space can overflow the stack" ,
157
156
) ;
158
157
}
159
158
}
You can’t perform that action at this time.
0 commit comments