We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b1d0b2 commit ad8126aCopy full SHA for ad8126a
clippy_lints/src/large_stack_frames.rs
@@ -1,6 +1,6 @@
1
use std::ops::AddAssign;
2
3
-use clippy_utils::diagnostics::span_lint_and_then;
+use clippy_utils::diagnostics::span_lint_and_note;
4
use rustc_hir::def_id::LocalDefId;
5
use rustc_hir::intravisit::FnKind;
6
use rustc_hir::Body;
@@ -146,14 +146,13 @@ impl<'tcx> LateLintPass<'tcx> for LargeStackFrames {
146
}
147
148
if frame_size.exceeds_limit(self.maximum_allowed_size) {
149
- span_lint_and_then(
+ span_lint_and_note(
150
cx,
151
LARGE_STACK_FRAMES,
152
span,
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
- },
+ None,
+ "allocating large amounts of stack space can overflow the stack",
157
);
158
159
0 commit comments