mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-30 06:53:27 +00:00
59 lines
2 KiB
Text
59 lines
2 KiB
Text
error: allocating a local array larger than 512000 bytes
|
|
--> $DIR/large_stack_arrays.rs:29:14
|
|
|
|
|
LL | let _x = [build(); 3];
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
= help: consider allocating on the heap with `vec![build(); 3].into_boxed_slice()`
|
|
= note: `-D clippy::large-stack-arrays` implied by `-D warnings`
|
|
|
|
error: allocating a local array larger than 512000 bytes
|
|
--> $DIR/large_stack_arrays.rs:31:14
|
|
|
|
|
LL | let _y = [build(), build(), build()];
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider allocating on the heap with `vec![build(), build(), build()].into_boxed_slice()`
|
|
|
|
error: allocating a local array larger than 512000 bytes
|
|
--> $DIR/large_stack_arrays.rs:36:9
|
|
|
|
|
LL | [0u32; 20_000_000],
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider allocating on the heap with `vec![0u32; 20_000_000].into_boxed_slice()`
|
|
|
|
error: allocating a local array larger than 512000 bytes
|
|
--> $DIR/large_stack_arrays.rs:37:9
|
|
|
|
|
LL | [S { data: [0; 32] }; 5000],
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider allocating on the heap with `vec![S { data: [0; 32] }; 5000].into_boxed_slice()`
|
|
|
|
error: allocating a local array larger than 512000 bytes
|
|
--> $DIR/large_stack_arrays.rs:38:9
|
|
|
|
|
LL | [Some(""); 20_000_000],
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider allocating on the heap with `vec![Some(""); 20_000_000].into_boxed_slice()`
|
|
|
|
error: allocating a local array larger than 512000 bytes
|
|
--> $DIR/large_stack_arrays.rs:39:9
|
|
|
|
|
LL | [E::T(0); 5000],
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider allocating on the heap with `vec![E::T(0); 5000].into_boxed_slice()`
|
|
|
|
error: allocating a local array larger than 512000 bytes
|
|
--> $DIR/large_stack_arrays.rs:40:9
|
|
|
|
|
LL | [0u8; usize::MAX],
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider allocating on the heap with `vec![0u8; usize::MAX].into_boxed_slice()`
|
|
|
|
error: aborting due to 7 previous errors
|
|
|