diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-07-18 19:14:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-18 19:14:43 +0200 |
| commit | b3827e4f3728b77bd3e60587487ebfc3cc8d901b (patch) | |
| tree | c53f9b733d914684f658dd5a7f2e1813bce849a7 /tests/ui/consts/const-eval/ub-ref-ptr.rs | |
| parent | 61285e211bf3d323d2c5d649c99207c500cc0cc2 (diff) | |
| parent | 652ba279ecc693d8b4310c40e645a62009f5b0ed (diff) | |
| download | rust-b3827e4f3728b77bd3e60587487ebfc3cc8d901b.tar.gz rust-b3827e4f3728b77bd3e60587487ebfc3cc8d901b.zip | |
Rollup merge of #142673 - oli-obk:uninit-read-mem, r=RalfJung
Show the offset, length and memory of uninit read errors r? ``@RalfJung`` I want to improve memory dumps in general. Not sure yet how to do so best within rust diagnostics, but in a perfect world I could generate a dummy in-memory file (that contains the rendered memory dump) that we then can then provide regular rustc `Span`s to. So we'd basically report normal diagnostics for them with squiggly lines and everything.
Diffstat (limited to 'tests/ui/consts/const-eval/ub-ref-ptr.rs')
| -rw-r--r-- | tests/ui/consts/const-eval/ub-ref-ptr.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/ui/consts/const-eval/ub-ref-ptr.rs b/tests/ui/consts/const-eval/ub-ref-ptr.rs index 64b48939be6..d8e5102fcbe 100644 --- a/tests/ui/consts/const-eval/ub-ref-ptr.rs +++ b/tests/ui/consts/const-eval/ub-ref-ptr.rs @@ -1,8 +1,9 @@ // ignore-tidy-linelength // Strip out raw byte dumps to make comparison platform-independent: //@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -//@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr: "([0-9a-f][0-9a-f] |__ |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" //@ dont-require-annotations: NOTE +//@ normalize-stderr: "0x[0-9](\.\.|\])" -> "0x%$1" #![allow(invalid_value)] |
