about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui-toml/large_stack_frames
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2024-04-04 19:52:55 +0200
committerPhilipp Krones <hello@philkrones.com>2024-04-04 19:52:55 +0200
commiteedf15a1dc54097439ecd524e315665f18eaf31c (patch)
tree79d704c756fb28650e03e2f2dc37b6577559283a /src/tools/clippy/tests/ui-toml/large_stack_frames
parent96eaf553e547e36003e235a9de26c11460712231 (diff)
parent9725c4a162502a02c1c67fdca6b797fe09b2b73c (diff)
Merge commit '9725c4a162502a02c1c67fdca6b797fe09b2b73c' into clippy-subtree-update
Diffstat (limited to 'src/tools/clippy/tests/ui-toml/large_stack_frames')
-rw-r--r--src/tools/clippy/tests/ui-toml/large_stack_frames/large_stack_frames.rs2
-rw-r--r--src/tools/clippy/tests/ui-toml/large_stack_frames/large_stack_frames.stderr17
2 files changed, 10 insertions, 9 deletions
diff --git a/src/tools/clippy/tests/ui-toml/large_stack_frames/large_stack_frames.rs b/src/tools/clippy/tests/ui-toml/large_stack_frames/large_stack_frames.rs
index 39798ffea49..a612e56570f 100644
--- a/src/tools/clippy/tests/ui-toml/large_stack_frames/large_stack_frames.rs
+++ b/src/tools/clippy/tests/ui-toml/large_stack_frames/large_stack_frames.rs
@@ -10,7 +10,7 @@ fn f() {
     let _x = create_array::<1000>();
 }
 fn f2() {
-    //~^ ERROR: this function allocates a large amount of stack space
+    //~^ ERROR: this function may allocate 1001 bytes on the stack
     let _x = create_array::<1001>();
 }
 
diff --git a/src/tools/clippy/tests/ui-toml/large_stack_frames/large_stack_frames.stderr b/src/tools/clippy/tests/ui-toml/large_stack_frames/large_stack_frames.stderr
index c23fac14564..19983e2f3e8 100644
--- a/src/tools/clippy/tests/ui-toml/large_stack_frames/large_stack_frames.stderr
+++ b/src/tools/clippy/tests/ui-toml/large_stack_frames/large_stack_frames.stderr
@@ -1,13 +1,14 @@
-error: this function allocates a large amount of stack space
-  --> tests/ui-toml/large_stack_frames/large_stack_frames.rs:12:1
+error: this function may allocate 1001 bytes on the stack
+  --> tests/ui-toml/large_stack_frames/large_stack_frames.rs:12:4
    |
-LL | / fn f2() {
-LL | |
-LL | |     let _x = create_array::<1001>();
-LL | | }
-   | |_^
+LL | fn f2() {
+   |    ^^
+LL |
+LL |     let _x = create_array::<1001>();
+   |         -- `_x` is the largest part, at 1001 bytes for type `[u8; 1001]`
    |
-   = note: allocating large amounts of stack space can overflow the stack
+   = note: 1001 bytes is larger than Clippy's configured `stack-size-threshold` of 1000
+   = 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)]`