2023-07-02 12:35:19 +00:00
|
|
|
error: this function allocates a large amount of stack space
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/large_stack_frames.rs:25:1
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | / fn many_small_arrays() {
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | |
|
|
|
|
LL | |
|
2023-07-02 12:35:19 +00:00
|
|
|
LL | | let x = [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`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::large_stack_frames)]`
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
error: this function allocates a large amount of stack space
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/large_stack_frames.rs:36:1
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | / fn large_return_value() -> ArrayDefault<1_000_000> {
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | |
|
|
|
|
LL | |
|
2023-07-02 12:35:19 +00:00
|
|
|
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
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/large_stack_frames.rs:42:1
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | / fn large_fn_arg(x: ArrayDefault<1_000_000>) {
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | |
|
|
|
|
LL | |
|
2023-07-02 12:35:19 +00:00
|
|
|
LL | | black_box(&x);
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
= note: allocating large amounts of stack space can overflow the stack
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|