2024-03-28 00:52:34 -05:00
|
|
|
error: this function may allocate 250$PTR bytes on the stack
|
|
|
|
--> tests/ui/large_stack_frames.rs:27:4
|
|
|
|
|
|
|
|
|
LL | fn many_small_arrays() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
...
|
|
|
|
LL | let x5 = [0u8; 500_000];
|
|
|
|
| -- `x5` is the largest part, at 500000 bytes for type `[u8; 500000]`
|
|
|
|
|
|
|
|
|
= note: 250$PTR bytes is larger than Clippy's configured `stack-size-threshold` of 512000
|
|
|
|
= note: allocating large amounts of stack space can overflow the stack and cause the program to abort
|
2023-07-02 07:35:19 -05:00
|
|
|
= note: `-D clippy::large-stack-frames` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::large_stack_frames)]`
|
2023-07-02 07:35:19 -05:00
|
|
|
|
2024-03-28 00:52:34 -05:00
|
|
|
error: this function may allocate 1000000 bytes on the stack
|
|
|
|
--> tests/ui/large_stack_frames.rs:37:4
|
|
|
|
|
|
|
|
|
LL | fn large_return_value() -> ArrayDefault<1_000_000> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ ----------------------- this is the largest part, at 1000000 bytes for type `ArrayDefault<1000000>`
|
|
|
|
|
|
|
|
|
= note: 1000000 bytes is larger than Clippy's configured `stack-size-threshold` of 512000
|
|
|
|
|
|
|
|
error: this function may allocate 100$PTR bytes on the stack
|
|
|
|
--> tests/ui/large_stack_frames.rs:42:4
|
2023-07-02 07:35:19 -05:00
|
|
|
|
|
2024-03-28 00:52:34 -05:00
|
|
|
LL | fn large_fn_arg(x: ArrayDefault<1_000_000>) {
|
|
|
|
| ^^^^^^^^^^^^ - `x` is the largest part, at 1000000 bytes for type `ArrayDefault<1000000>`
|
2023-07-02 07:35:19 -05:00
|
|
|
|
|
2024-03-28 00:52:34 -05:00
|
|
|
= note: 100$PTR bytes is larger than Clippy's configured `stack-size-threshold` of 512000
|
2023-07-02 07:35:19 -05:00
|
|
|
|
2024-03-28 00:52:34 -05:00
|
|
|
error: this function may allocate 100$PTR bytes on the stack
|
|
|
|
--> tests/ui/large_stack_frames.rs:48:13
|
2023-07-02 07:35:19 -05:00
|
|
|
|
|
2024-03-28 00:52:34 -05:00
|
|
|
LL | let f = || black_box(&[0u8; 1_000_000]);
|
|
|
|
| ^^^^^^^^^^^^^^----------------^
|
|
|
|
| |
|
|
|
|
| this is the largest part, at 1000000 bytes for type `[u8; 1000000]`
|
2023-07-02 07:35:19 -05:00
|
|
|
|
|
2024-03-28 00:52:34 -05:00
|
|
|
= note: 100$PTR bytes is larger than Clippy's configured `stack-size-threshold` of 512000
|
2023-07-02 07:35:19 -05:00
|
|
|
|
2024-03-28 00:52:34 -05:00
|
|
|
error: aborting due to 4 previous errors
|
2023-07-02 07:35:19 -05:00
|
|
|
|