diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-09-24 20:34:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-24 20:34:31 +0200 |
| commit | ec378dc7732e7a2657539072cfd25c68f8802509 (patch) | |
| tree | a0d193440aa5f0f1781db2028555338c0f7cf475 /compiler/rustc_middle/src/mir/interpret/error.rs | |
| parent | 24e19c908840551293a3fb4a9069e3d92b07eccb (diff) | |
| parent | 8328c3dada0c888b1c570f97314b3f697d4b2a96 (diff) | |
| download | rust-ec378dc7732e7a2657539072cfd25c68f8802509.tar.gz rust-ec378dc7732e7a2657539072cfd25c68f8802509.zip | |
Rollup merge of #146969 - RalfJung:maybe-null-errors, r=oli-obk
const-eval: better wording for errors involving maybe-null pointers Fixes https://github.com/rust-lang/rust/issues/146748 r? ``@oli-obk``
Diffstat (limited to 'compiler/rustc_middle/src/mir/interpret/error.rs')
| -rw-r--r-- | compiler/rustc_middle/src/mir/interpret/error.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_middle/src/mir/interpret/error.rs b/compiler/rustc_middle/src/mir/interpret/error.rs index 7c72a8ec243..951aac503fe 100644 --- a/compiler/rustc_middle/src/mir/interpret/error.rs +++ b/compiler/rustc_middle/src/mir/interpret/error.rs @@ -499,10 +499,7 @@ pub enum ValidationErrorKind<'tcx> { MutableRefInConst, NullFnPtr, NeverVal, - NullablePtrOutOfRange { - range: WrappingRange, - max_value: u128, - }, + NonnullPtrMaybeNull, PtrOutOfRange { range: WrappingRange, max_value: u128, @@ -544,6 +541,8 @@ pub enum ValidationErrorKind<'tcx> { }, NullPtr { ptr_kind: PointerKind, + /// Records whether this pointer is definitely null or just may be null. + maybe: bool, }, DanglingPtrNoProvenance { ptr_kind: PointerKind, |
