From 6e80db96ea933676ac9b36714e3af9aaa3eedc00 Mon Sep 17 00:00:00 2001 From: y21 <30553356+y21@users.noreply.github.com> Date: Sun, 24 Sep 2023 16:29:26 +0200 Subject: [PATCH] use a smaller number in test that fits in usize for 32 bit --- tests/ui-toml/large_stack_frames/clippy.toml | 2 +- tests/ui-toml/large_stack_frames/large_stack_frames.rs | 4 ++-- tests/ui-toml/large_stack_frames/large_stack_frames.stderr | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/ui-toml/large_stack_frames/clippy.toml b/tests/ui-toml/large_stack_frames/clippy.toml index 1b68801b9705..584335dc28fb 100644 --- a/tests/ui-toml/large_stack_frames/clippy.toml +++ b/tests/ui-toml/large_stack_frames/clippy.toml @@ -1 +1 @@ -stack-size-threshold = 4294967296 +stack-size-threshold = 1000 diff --git a/tests/ui-toml/large_stack_frames/large_stack_frames.rs b/tests/ui-toml/large_stack_frames/large_stack_frames.rs index 39b3c571c5c9..39798ffea494 100644 --- a/tests/ui-toml/large_stack_frames/large_stack_frames.rs +++ b/tests/ui-toml/large_stack_frames/large_stack_frames.rs @@ -7,11 +7,11 @@ fn create_array() -> [u8; N] { } fn f() { - let _x = create_array::<4294967296>(); + let _x = create_array::<1000>(); } fn f2() { //~^ ERROR: this function allocates a large amount of stack space - let _x = create_array::<4294967297>(); + let _x = create_array::<1001>(); } fn main() {} diff --git a/tests/ui-toml/large_stack_frames/large_stack_frames.stderr b/tests/ui-toml/large_stack_frames/large_stack_frames.stderr index ef7d15a3739a..67ee57ab672d 100644 --- a/tests/ui-toml/large_stack_frames/large_stack_frames.stderr +++ b/tests/ui-toml/large_stack_frames/large_stack_frames.stderr @@ -3,7 +3,7 @@ error: this function allocates a large amount of stack space | LL | / fn f2() { LL | | -LL | | let _x = create_array::<4294967297>(); +LL | | let _x = create_array::<1001>(); LL | | } | |_^ |