about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/large_const_arrays.stderr
blob: 56cddeaf628d24189f2e2b7e231f745c6eeb7cdc (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
error: large array defined as const
  --> tests/ui/large_const_arrays.rs:10:1
   |
LL | pub(crate) const FOO_PUB_CRATE: [u32; 1_000_000] = [0u32; 1_000_000];
   | ^^^^^^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |            |
   |            help: make this a static item: `static`
   |
   = note: `-D clippy::large-const-arrays` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::large_const_arrays)]`

error: large array defined as const
  --> tests/ui/large_const_arrays.rs:12:1
   |
LL | pub const FOO_PUB: [u32; 1_000_000] = [0u32; 1_000_000];
   | ^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: make this a static item: `static`

error: large array defined as const
  --> tests/ui/large_const_arrays.rs:14:1
   |
LL | const FOO_COMPUTED: [u32; 1_000 * 100] = [0u32; 1_000 * 100];
   | -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | help: make this a static item: `static`

error: large array defined as const
  --> tests/ui/large_const_arrays.rs:16:1
   |
LL | const FOO: [u32; 1_000_000] = [0u32; 1_000_000];
   | -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | help: make this a static item: `static`

error: large array defined as const
  --> tests/ui/large_const_arrays.rs:27:5
   |
LL |     pub const BAR_PUB: [u32; 1_000_000] = [0u32; 1_000_000];
   |     ^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |         |
   |         help: make this a static item: `static`

error: large array defined as const
  --> tests/ui/large_const_arrays.rs:29:5
   |
LL |     const BAR: [u32; 1_000_000] = [0u32; 1_000_000];
   |     -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: make this a static item: `static`

error: large array defined as const
  --> tests/ui/large_const_arrays.rs:31:5
   |
LL |     pub const BAR_STRUCT_PUB: [S; 5_000] = [S { data: [0; 32] }; 5_000];
   |     ^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |         |
   |         help: make this a static item: `static`

error: large array defined as const
  --> tests/ui/large_const_arrays.rs:33:5
   |
LL |     const BAR_STRUCT: [S; 5_000] = [S { data: [0; 32] }; 5_000];
   |     -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: make this a static item: `static`

error: large array defined as const
  --> tests/ui/large_const_arrays.rs:35:5
   |
LL |     pub const BAR_S_PUB: [Option<&str>; 200_000] = [Some("str"); 200_000];
   |     ^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |         |
   |         help: make this a static item: `static`

error: large array defined as const
  --> tests/ui/large_const_arrays.rs:37:5
   |
LL |     const BAR_S: [Option<&str>; 200_000] = [Some("str"); 200_000];
   |     -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: make this a static item: `static`

error: aborting due to 10 previous errors