rust/tests/ui/limits/issue-15919-64.no-debuginfo.stderr
Martin Nordholts 2ce6154b32 compiler: Include span of too huge array with -Cdebuginfo=2
We have a few ui tests to ensure we emit an error if we encounter too
big arrays. Before this fix, compiling the tests with `-Cdebuginfo=2`
would not include the spans of the instantiation sites, because the
error is then emitted from a different code path that does not include
the span.

Propagate the span to the error also in the debuginfo case, so the tests
passes regardless of debuginfo level.
2025-08-30 11:09:29 +02:00

9 lines
234 B
Plaintext

error: values of the type `[usize; usize::MAX]` are too big for the target architecture
--> $DIR/issue-15919-64.rs:10:9
|
LL | let x = [0usize; 0xffff_ffff_ffff_ffff];
| ^
error: aborting due to 1 previous error