about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/large_stack_frames.stderr
blob: 79482e65c3e627a8ae72585d2899f019699df9bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
error: this function may allocate 250$PTR bytes on the stack
  --> tests/ui/large_stack_frames.rs:21: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
   = note: `-D clippy::large-stack-frames` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::large_stack_frames)]`

error: this function may allocate 1000000 bytes on the stack
  --> tests/ui/large_stack_frames.rs:32: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:38:4
   |
LL | fn large_fn_arg(x: ArrayDefault<1_000_000>) {
   |    ^^^^^^^^^^^^ - `x` is the largest part, at 1000000 bytes for type `ArrayDefault<1000000>`
   |
   = note: 100$PTR 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:45:13
   |
LL |     let f = || black_box(&[0u8; 1_000_000]);
   |             ^^^^^^^^^^^^^^----------------^
   |                           |
   |                           this is the largest part, at 1000000 bytes for type `[u8; 1000000]`
   |
   = note: 100$PTR bytes is larger than Clippy's configured `stack-size-threshold` of 512000

error: aborting due to 4 previous errors