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 11use std:: ops:: AddAssign ;
22
3- use clippy_utils:: diagnostics:: span_lint_and_then ;
3+ use clippy_utils:: diagnostics:: span_lint_and_note ;
44use rustc_hir:: def_id:: LocalDefId ;
55use rustc_hir:: intravisit:: FnKind ;
66use rustc_hir:: Body ;
@@ -146,14 +146,13 @@ impl<'tcx> LateLintPass<'tcx> for LargeStackFrames {
146146 }
147147
148148 if frame_size. exceeds_limit ( self . maximum_allowed_size ) {
149- span_lint_and_then (
149+ span_lint_and_note (
150150 cx,
151151 LARGE_STACK_FRAMES ,
152152 span,
153153 "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" ,
157156 ) ;
158157 }
159158 }
You can’t perform that action at this time.
0 commit comments