From ee7a6c6acc01560895796f2d5206f38955e3768c Mon Sep 17 00:00:00 2001 From: hyd-dev Date: Tue, 4 May 2021 18:27:02 +0800 Subject: [PATCH] Remove `rustc_middle::mir::interpret::CheckInAllocMsg::NullPointerTest` --- compiler/rustc_middle/src/mir/interpret/error.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/compiler/rustc_middle/src/mir/interpret/error.rs b/compiler/rustc_middle/src/mir/interpret/error.rs index d4970a4f5321f..e452463fbf5de 100644 --- a/compiler/rustc_middle/src/mir/interpret/error.rs +++ b/compiler/rustc_middle/src/mir/interpret/error.rs @@ -171,7 +171,6 @@ impl fmt::Display for InvalidProgramInfo<'_> { #[derive(Debug, Copy, Clone, TyEncodable, TyDecodable, HashStable)] pub enum CheckInAllocMsg { MemoryAccessTest, - NullPointerTest, PointerArithmeticTest, InboundsTest, } @@ -185,7 +184,6 @@ impl fmt::Display for CheckInAllocMsg { "{}", match *self { CheckInAllocMsg::MemoryAccessTest => "memory access", - CheckInAllocMsg::NullPointerTest => "null pointer test", CheckInAllocMsg::PointerArithmeticTest => "pointer arithmetic", CheckInAllocMsg::InboundsTest => "inbounds test", } @@ -308,9 +306,6 @@ impl fmt::Display for UndefinedBehaviorInfo<'_> { ptr.alloc_id, allocation_size.bytes() ), - DanglingIntPointer(_, CheckInAllocMsg::NullPointerTest) => { - write!(f, "null pointer is not allowed for this operation") - } DanglingIntPointer(i, msg) => { write!(f, "{} failed: 0x{:x} is not a valid pointer", msg, i) }