Skip to content

Commit ffd0dc7

Browse files
committed
Improve miri's error reporting in check_in_alloc
1 parent b1c829b commit ffd0dc7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/librustc/mir/interpret/allocation.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ pub enum CheckInAllocMsg {
3333

3434
impl Display for CheckInAllocMsg {
3535
/// When this is printed as an error the context looks like this
36-
/// "{test name} test failed: pointer must be in-bounds at offset..."
36+
/// "{test name} failed: pointer must be in-bounds at offset..."
3737
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
38-
write!(f, "{} test", match *self {
38+
write!(f, "{}", match *self {
3939
CheckInAllocMsg::MemoryAccessTest => "Memory access",
40-
CheckInAllocMsg::NullPointerTest => "Null pointer",
41-
CheckInAllocMsg::PointerArithmeticTest => "Pointer arithmetic",
42-
CheckInAllocMsg::InboundsTest => "Inbounds",
40+
CheckInAllocMsg::NullPointerTest => "Null pointer test",
41+
CheckInAllocMsg::PointerArithmeticTest => "Pointer arithmetic test",
42+
CheckInAllocMsg::InboundsTest => "Inbounds test",
4343
})
4444
}
4545
}

0 commit comments

Comments
 (0)