mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
01646457a9
Instead of just saying “this function's stack frame is big”, report: * the (presumed) size of the frame * the size and type of the largest local contributing to that size * the configurable limit that was exceeded (once)
16 lines
668 B
Text
16 lines
668 B
Text
error: this function may allocate 1001 bytes on the stack
|
|
--> tests/ui-toml/large_stack_frames/large_stack_frames.rs:12:4
|
|
|
|
|
LL | fn f2() {
|
|
| ^^
|
|
LL |
|
|
LL | let _x = create_array::<1001>();
|
|
| -- `_x` is the largest part, at 1001 bytes for type `[u8; 1001]`
|
|
|
|
|
= note: 1001 bytes is larger than Clippy's configured `stack-size-threshold` of 1000
|
|
= note: allocating large amounts of stack space can overflow the stack and cause the program to abort
|
|
= note: `-D clippy::large-stack-frames` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::large_stack_frames)]`
|
|
|
|
error: aborting due to 1 previous error
|
|
|