summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/large_const_arrays.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/tools/clippy/tests/ui/large_const_arrays.stderr
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/tests/ui/large_const_arrays.stderr')
-rw-r--r--src/tools/clippy/tests/ui/large_const_arrays.stderr76
1 files changed, 76 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/large_const_arrays.stderr b/src/tools/clippy/tests/ui/large_const_arrays.stderr
new file mode 100644
index 000000000..3fb0acbca
--- /dev/null
+++ b/src/tools/clippy/tests/ui/large_const_arrays.stderr
@@ -0,0 +1,76 @@
+error: large array defined as const
+ --> $DIR/large_const_arrays.rs:12: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`
+
+error: large array defined as const
+ --> $DIR/large_const_arrays.rs:13: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
+ --> $DIR/large_const_arrays.rs:14: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
+ --> $DIR/large_const_arrays.rs:23: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
+ --> $DIR/large_const_arrays.rs:24: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
+ --> $DIR/large_const_arrays.rs:25: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
+ --> $DIR/large_const_arrays.rs:26: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
+ --> $DIR/large_const_arrays.rs:27: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
+ --> $DIR/large_const_arrays.rs:28:5
+ |
+LL | const BAR_S: [Option<&str>; 200_000] = [Some("str"); 200_000];
+ | -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | |
+ | help: make this a static item: `static`
+
+error: aborting due to 9 previous errors
+