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 /compiler/rustc_const_eval/src/interpret | |
| 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 'compiler/rustc_const_eval/src/interpret')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/validity.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs index 62f591ceaa9..693b3782960 100644 --- a/compiler/rustc_const_eval/src/interpret/validity.rs +++ b/compiler/rustc_const_eval/src/interpret/validity.rs @@ -394,7 +394,7 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValidityVisitor<'rt, 'tcx, M> { interp_ok(try_validation!( self.ecx.read_immediate(val), self.path, - Ub(InvalidUninitBytes(None)) => + Ub(InvalidUninitBytes(_)) => Uninit { expected }, // The `Unsup` cases can only occur during CTFE Unsup(ReadPointerAsInt(_)) => |
