about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-22 05:44:21 +0000
committerbors <bors@rust-lang.org>2023-07-22 05:44:21 +0000
commita8765525fb625df692bc565f08a18362bd382c7e (patch)
tree402dbdf6836df5950480006290af3baa80996fb8 /compiler/rustc_const_eval/src/errors.rs
parenta5e2eca40ec17f17b6641bcc7c069380ac395acf (diff)
parent5bbf0a8306340f849ee732c5caf3decd1db24d44 (diff)
downloadrust-a8765525fb625df692bc565f08a18362bd382c7e.tar.gz
rust-a8765525fb625df692bc565f08a18362bd382c7e.zip
Auto merge of #113946 - dtolnay:revertniche, r=oli-obk
Revert "Prototype: Add unstable `-Z reference-niches` option"

Clean revert of #113166. I confirmed this fixes #113941.
Diffstat (limited to 'compiler/rustc_const_eval/src/errors.rs')
-rw-r--r--compiler/rustc_const_eval/src/errors.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs
index 61ce695ccd2..ca38cce710e 100644
--- a/compiler/rustc_const_eval/src/errors.rs
+++ b/compiler/rustc_const_eval/src/errors.rs
@@ -617,6 +617,7 @@ impl<'tcx> ReportErrorExt for ValidationErrorInfo<'tcx> {
             MutableRefInConst => const_eval_mutable_ref_in_const,
             NullFnPtr => const_eval_null_fn_ptr,
             NeverVal => const_eval_never_val,
+            NullablePtrOutOfRange { .. } => const_eval_nullable_ptr_out_of_range,
             PtrOutOfRange { .. } => const_eval_ptr_out_of_range,
             OutOfRange { .. } => const_eval_out_of_range,
             UnsafeCell => const_eval_unsafe_cell,
@@ -731,7 +732,9 @@ impl<'tcx> ReportErrorExt for ValidationErrorInfo<'tcx> {
             | InvalidFnPtr { value } => {
                 err.set_arg("value", value);
             }
-            PtrOutOfRange { range, max_value } => add_range_arg(range, max_value, handler, err),
+            NullablePtrOutOfRange { range, max_value } | PtrOutOfRange { range, max_value } => {
+                add_range_arg(range, max_value, handler, err)
+            }
             OutOfRange { range, max_value, value } => {
                 err.set_arg("value", value);
                 add_range_arg(range, max_value, handler, err);