diff options
| author | Martin Nordholts <martin.nordholts@codetale.se> | 2025-08-30 10:38:23 +0200 |
|---|---|---|
| committer | Martin Nordholts <martin.nordholts@codetale.se> | 2025-08-30 11:09:29 +0200 |
| commit | 2ce6154b32c50b3588e0c58b6f106647a8831de8 (patch) | |
| tree | e71304defee521c856e5644d1e83e3b033bbaa16 /tests/ui/limits/huge-array-simple-64.no-debuginfo.stderr | |
| parent | b53c72ffaaf10e17fef5deb063f2f3f3bc13c171 (diff) | |
| download | rust-2ce6154b32c50b3588e0c58b6f106647a8831de8.tar.gz rust-2ce6154b32c50b3588e0c58b6f106647a8831de8.zip | |
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.
Diffstat (limited to 'tests/ui/limits/huge-array-simple-64.no-debuginfo.stderr')
| -rw-r--r-- | tests/ui/limits/huge-array-simple-64.no-debuginfo.stderr | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/limits/huge-array-simple-64.no-debuginfo.stderr b/tests/ui/limits/huge-array-simple-64.no-debuginfo.stderr new file mode 100644 index 00000000000..8ce93ab1884 --- /dev/null +++ b/tests/ui/limits/huge-array-simple-64.no-debuginfo.stderr @@ -0,0 +1,8 @@ +error: values of the type `[u8; 2305843011361177600]` are too big for the target architecture + --> $DIR/huge-array-simple-64.rs:12:9 + | +LL | let _fat: [u8; (1<<61)+(1<<31)] = + | ^^^^ + +error: aborting due to 1 previous error + |
