rust-clippy/tests/ui/large_stack_arrays.stderr
Areredify 7fddac0404 Add new lint: large stack array
added documentation

minor style fix

change as to ::from

add ignore to doc

include threshold in lint message/make suggestion more apparent/use Scalar api instead of matching

style fix

shange snippet_opt to snippet
2019-11-13 21:44:29 +03:00

35 lines
1.2 KiB
Text

error: allocating a local array larger than 512000 bytes
--> $DIR/large_stack_arrays.rs:17:9
|
LL | [0u32; 20_000_000],
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::large-stack-arrays` implied by `-D warnings`
= 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:18: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:19: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:20:9
|
LL | [E::T(0); 5000],
| ^^^^^^^^^^^^^^^
|
= help: consider allocating on the heap with vec![E::T(0); 5000].into_boxed_slice()
error: aborting due to 4 previous errors