mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-30 16:39:26 +00:00
37 lines
1.1 KiB
Text
37 lines
1.1 KiB
Text
error: this function allocates a large amount of stack space
|
|
--> $DIR/large_stack_frames.rs:25:1
|
|
|
|
|
LL | / fn many_small_arrays() {
|
|
LL | | let x = [0u8; 500_000];
|
|
LL | | let x2 = [0u8; 500_000];
|
|
LL | | let x3 = [0u8; 500_000];
|
|
... |
|
|
LL | | black_box((&x, &x2, &x3, &x4, &x5));
|
|
LL | | }
|
|
| |_^
|
|
|
|
|
= note: allocating large amounts of stack space can overflow the stack
|
|
= note: `-D clippy::large-stack-frames` implied by `-D warnings`
|
|
|
|
error: this function allocates a large amount of stack space
|
|
--> $DIR/large_stack_frames.rs:34:1
|
|
|
|
|
LL | / fn large_return_value() -> ArrayDefault<1_000_000> {
|
|
LL | | Default::default()
|
|
LL | | }
|
|
| |_^
|
|
|
|
|
= note: allocating large amounts of stack space can overflow the stack
|
|
|
|
error: this function allocates a large amount of stack space
|
|
--> $DIR/large_stack_frames.rs:38:1
|
|
|
|
|
LL | / fn large_fn_arg(x: ArrayDefault<1_000_000>) {
|
|
LL | | black_box(&x);
|
|
LL | | }
|
|
| |_^
|
|
|
|
|
= note: allocating large amounts of stack space can overflow the stack
|
|
|
|
error: aborting due to 3 previous errors
|
|
|