From ffd0dc79dab71743cbb5b345c3d0400b4cb0e645 Mon Sep 17 00:00:00 2001 From: loomaclin Date: Sun, 26 May 2019 13:26:24 +0300 Subject: [PATCH] Improve miri's error reporting in check_in_alloc --- src/librustc/mir/interpret/allocation.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/librustc/mir/interpret/allocation.rs b/src/librustc/mir/interpret/allocation.rs index 2910deadb9e..718d9046f92 100644 --- a/src/librustc/mir/interpret/allocation.rs +++ b/src/librustc/mir/interpret/allocation.rs @@ -33,13 +33,13 @@ pub enum CheckInAllocMsg { impl Display for CheckInAllocMsg { /// When this is printed as an error the context looks like this - /// "{test name} test failed: pointer must be in-bounds at offset..." + /// "{test name} failed: pointer must be in-bounds at offset..." fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{} test", match *self { + write!(f, "{}", match *self { CheckInAllocMsg::MemoryAccessTest => "Memory access", - CheckInAllocMsg::NullPointerTest => "Null pointer", - CheckInAllocMsg::PointerArithmeticTest => "Pointer arithmetic", - CheckInAllocMsg::InboundsTest => "Inbounds", + CheckInAllocMsg::NullPointerTest => "Null pointer test", + CheckInAllocMsg::PointerArithmeticTest => "Pointer arithmetic test", + CheckInAllocMsg::InboundsTest => "Inbounds test", }) } }