diff options
| author | Philipp Krones <hello@philkrones.com> | 2023-08-24 21:04:57 +0200 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2023-08-24 21:04:57 +0200 |
| commit | ef4d64f1bd3f2a5693f062136f8411ac641bece8 (patch) | |
| tree | 386b8d0068d4b23d23f2a0ba5f8ee052dfc566a0 /tests/ui/large_stack_frames.rs | |
| parent | 32eecd4b884dd2901aad05d66d78ea643a896e25 (diff) | |
| parent | df68b713270775364dc286eaec1c48fd14ae50e4 (diff) | |
Merge remote-tracking branch 'upstream/master' into rustup
Diffstat (limited to 'tests/ui/large_stack_frames.rs')
| -rw-r--r-- | tests/ui/large_stack_frames.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/large_stack_frames.rs b/tests/ui/large_stack_frames.rs index cd9d0c8a67a..f32368f9397 100644 --- a/tests/ui/large_stack_frames.rs +++ b/tests/ui/large_stack_frames.rs @@ -23,6 +23,8 @@ impl<const N: usize> Default for ArrayDefault<N> { } fn many_small_arrays() { + //~^ ERROR: this function allocates a large amount of stack space + //~| NOTE: allocating large amounts of stack space can overflow the stack let x = [0u8; 500_000]; let x2 = [0u8; 500_000]; let x3 = [0u8; 500_000]; @@ -32,10 +34,14 @@ fn many_small_arrays() { } fn large_return_value() -> ArrayDefault<1_000_000> { + //~^ ERROR: this function allocates a large amount of stack space + //~| NOTE: allocating large amounts of stack space can overflow the stack Default::default() } fn large_fn_arg(x: ArrayDefault<1_000_000>) { + //~^ ERROR: this function allocates a large amount of stack space + //~| NOTE: allocating large amounts of stack space can overflow the stack black_box(&x); } |
