Skip to content

Commit be68ad3

Browse files
committed
Remove an unused validation error variant
1 parent 41dcdc0 commit be68ad3

File tree

3 files changed

+0
-8
lines changed

3 files changed

+0
-8
lines changed

compiler/rustc_const_eval/messages.ftl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,6 @@ const_eval_validation_out_of_range = {$front_matter}: encountered {$value}, but
454454
const_eval_validation_partial_pointer = {$front_matter}: encountered a partial pointer or a mix of pointers
455455
const_eval_validation_pointer_as_int = {$front_matter}: encountered a pointer, but {$expected}
456456
const_eval_validation_ptr_out_of_range = {$front_matter}: encountered a pointer, but expected something that cannot possibly fail to be {$in_range}
457-
const_eval_validation_ref_to_static = {$front_matter}: encountered a reference pointing to a static variable in a constant
458457
const_eval_validation_ref_to_uninhabited = {$front_matter}: encountered a reference pointing to uninhabited type {$ty}
459458
const_eval_validation_unaligned_box = {$front_matter}: encountered an unaligned box (required {$required_bytes} byte alignment but found {$found_bytes})
460459
const_eval_validation_unaligned_ref = {$front_matter}: encountered an unaligned reference (required {$required_bytes} byte alignment but found {$found_bytes})

compiler/rustc_const_eval/src/errors.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -640,9 +640,6 @@ impl<'tcx> ReportErrorExt for ValidationErrorInfo<'tcx> {
640640
const_eval_validation_ref_to_uninhabited
641641
}
642642

643-
PtrToStatic { ptr_kind: PointerKind::Box } => const_eval_validation_box_to_static,
644-
PtrToStatic { ptr_kind: PointerKind::Ref(_) } => const_eval_validation_ref_to_static,
645-
646643
PointerAsInt { .. } => const_eval_validation_pointer_as_int,
647644
PartialPointer => const_eval_validation_partial_pointer,
648645
ConstRefToMutable => const_eval_validation_const_ref_to_mutable,
@@ -807,7 +804,6 @@ impl<'tcx> ReportErrorExt for ValidationErrorInfo<'tcx> {
807804
);
808805
}
809806
NullPtr { .. }
810-
| PtrToStatic { .. }
811807
| ConstRefToMutable
812808
| ConstRefToExtern
813809
| MutableRefToImmutable

compiler/rustc_middle/src/mir/interpret/error.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,6 @@ pub enum ValidationErrorKind<'tcx> {
438438
ptr_kind: PointerKind,
439439
ty: Ty<'tcx>,
440440
},
441-
PtrToStatic {
442-
ptr_kind: PointerKind,
443-
},
444441
ConstRefToMutable,
445442
ConstRefToExtern,
446443
MutableRefToImmutable,

0 commit comments

Comments
 (0)